Skip to content

fix: improve dotnet portable executable identification#2133

Merged
kzantow merged 4 commits intoanchore:mainfrom
kzantow-anchore:fix/dotnet-cataloger-field-lookup
Nov 29, 2023
Merged

fix: improve dotnet portable executable identification#2133
kzantow merged 4 commits intoanchore:mainfrom
kzantow-anchore:fix/dotnet-cataloger-field-lookup

Conversation

@kzantow
Copy link
Copy Markdown
Contributor

@kzantow kzantow commented Sep 14, 2023

This PR attempts to improve the dotnet portable executable identification.

Fixes: #2029

In order to try to determine reasonable behavior, I created a spreadsheet of all the PE Version Resources from:

The general pattern in this limited data set seems to be: Microsoft PE files used the FileDescription while non-Microsoft vendors provided reasonable values in the ProductName. Additionally, this PR attempts to improve version detection based on some examples found in the wild.

@cichy3000
Copy link
Copy Markdown

Do we expect this to be merged soon ? #2241

Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow force-pushed the fix/dotnet-cataloger-field-lookup branch from 79ae4fb to 78bde03 Compare November 29, 2023 16:13
Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow marked this pull request as ready for review November 29, 2023 16:42
@kzantow kzantow requested a review from a team November 29, 2023 17:06
@kzantow
Copy link
Copy Markdown
Contributor Author

kzantow commented Nov 29, 2023

Sorry for the delay @cichy3000 -- I didn't want to get a change like this merged without some due diligence looking at examples in the wild to make sure we're not regressing. As noted in the description there's a spreadsheet with a lot of examples that was used to determine the behavior implemented in this PR

Comment thread syft/pkg/cataloger/dotnet/parse_dotnet_portable_executable.go Outdated
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow merged commit ef5c165 into anchore:main Nov 29, 2023
@kzantow kzantow deleted the fix/dotnet-cataloger-field-lookup branch November 29, 2023 17:51
spiffcs added a commit to coheigea/syft that referenced this pull request Dec 5, 2023
* main: (40 commits)
  chore(deps): bump anchore/sbom-action from 0.15.0 to 0.15.1 (anchore#2392)
  Retrieve remote licenses using pom.properties when there is no pom.xml (anchore#2315)
  fix(java): improve identification for org.apache.tapestry artifacts (anchore#2384)
  fix(java): improve identification for io.ratpack artifacts (anchore#2379)
  fix(java): improve identification for org.apache.cassandra artifacts (anchore#2386)
  fix(java): improve identification for org.neo4j.procedure artifacts (anchore#2388)
  fix: bump fangs for ptr summarize fix (anchore#2387)
  fix(java): improve identification for org.elasticsearch artifacts (anchore#2383)
  fix(java): improve identification for org.apache.geode artifacts (anchore#2382)
  fix(java): improve identification for org.apache.tomcat.embed artifacts (anchore#2381)
  fix(java): improve identification for io.projectreactor.netty artifacts (anchore#2378)
  fix(java): improve identification for org.eclipse.platform artifacts (anchore#2349)
  Generalize UI events for cataloging tasks (anchore#2369)
  chore(deps): update tools to latest versions (anchore#2376)
  chore(deps): bump github.com/google/go-containerregistry (anchore#2377)
  chore: fix tests failing due to Mac Rosetta cache (anchore#2374)
  fix: improve dotnet portable executable identification (anchore#2133)
  fix file metadata cataloger to use resolved locations (anchore#2370)
  fix: logging level for parsing potential PE files (anchore#2367)
  only remove breaking-change label when there are schema changes (anchore#2371)
  ...

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parser for dotnet_portable_executable using wrong attribute name.

3 participants