Modify

Opened 3 years ago

Closed 3 years ago

#21667 closed defect (fixed)

[PATCH] Add `ivy-checkdepsupdate` for plugins

Reported by: taylor.smock Owned by: team
Priority: normal Milestone:
Component: Plugin Version:
Keywords: Cc:

Description (last modified by taylor.smock)

It appears that most vulnerability scanners depend upon pom.xml files for the version numbers of dependencies.

The attached patch does the following:

  • Keep META-INF/maven/*
  • Add ivy-checkdepsupdate so we can get the newest dependency versions faster

Attachments (2)

21667.patch (1.5 KB ) - added by taylor.smock 3 years ago.
21667.2.patch (518 bytes ) - added by taylor.smock 3 years ago.
Drop maven information, keep ivy-depscheckupdate

Download all attachments as: .zip

Change History (8)

by taylor.smock, 3 years ago

Attachment: 21667.patch added

comment:1 by stoecker, 3 years ago

I don't think keeping useless files in the released executable file is a good idea.

in reply to:  1 ; comment:2 by taylor.smock, 3 years ago

Replying to stoecker:

I don't think keeping useless files in the released executable file is a good idea.

I would argue that they aren't entirely useless. It should allow us (and users) to look for vulnerable packages, and fix them faster.

The files are literally text files containing dependency information. The important bit is dependency version information. Since most security analyzers look for those (why? I would have assumed checksums would be used for the specific vulnerable files if the pom.xml wasn't available).

I don't mind going through everything that I maintain or is in JOSM svn and checking for updates, but not everything is in JOSM svn (or JOSM git). Example: 3rd party plugins. Which may use ant or gradle. And we haven't moved everything to in JOSM svn to ivy yet (for example, geotools). Which means I'll be trying to move non-ivy dependencies into ivy, if only to make finding updates slightly easier (for i in *; do if [ -f "${i}/ivy.xml" ]; then cd ${i}; updates_available=$(ant ivy-checkdepsupdate|grep "All dependencies are up to date"|wc -l); if [ ${updates_available} -ne 1 ]; then echo "Needs update"; break; fi; fi; done). Assuming the patch is partially rejected (specifically, the bit about keeping pom files around) and partially accepted (specifically ivy-checkdepsupdate).

With that being said, if we do want to remove useless files in released executables, we might want to look at implementing some kind of task to remove unused code (i.e., proguard) in non-library plugins.

in reply to:  2 ; comment:3 by stoecker, 3 years ago

Replying to taylor.smock:

I would argue that they aren't entirely useless. It should allow us (and users) to look for vulnerable packages, and fix them faster.

No, not entirely useless, but:

  • They depend on the build process.
  • They are ugly.

We had already discussion why we keep the README inside which contain a lot of stuff no longer relevant in the running program, so keeping completely useless files is worse :-)

With that being said, if we do want to remove useless files in released executables, we might want to look at implementing some kind of task to remove unused code (i.e., proguard) in non-library plugins.

+1

in reply to:  3 comment:4 by taylor.smock, 3 years ago

Summary: [PATCH] Keep maven dependency information for vulnerability scanners[PATCH] Add `ivy-checkdepsupdate` for plugins

Replying to stoecker:

No, not entirely useless, but:

  • They depend on the build process.
  • They are ugly.

They do depend upon the build process :( .
I cannot argue with ugly (beauty, or the lack thereof, is in the eye of the beholder).

We had already discussion why we keep the README inside which contain a lot of stuff no longer relevant in the running program, so keeping completely useless files is worse :-)

#19941?

Anyway, I'll modify the patch so it only has the ivy-checkdepsupdate.

by taylor.smock, 3 years ago

Attachment: 21667.2.patch added

Drop maven information, keep ivy-depscheckupdate

comment:5 by taylor.smock, 3 years ago

Description: modified (diff)

comment:6 by stoecker, 3 years ago

Resolution: fixed
Status: newclosed

In 35878/osm:

add target ivy-checkdepsupdate, patch by Taylor Smock, fix #21667

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.