Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native jar parsing #833

Merged
merged 11 commits into from
Jan 27, 2024
Merged

Native jar parsing #833

merged 11 commits into from
Jan 27, 2024

Conversation

prabhu
Copy link
Collaborator

@prabhu prabhu commented Jan 27, 2024

In deep mode, cdxgen was repeatedly invoking the jar -tf command to catalog the entries in a jar file. This approach proved to be both slow and error-prone since the jar command may not be available in certain runtime-only installations.

This PR replaces the jar invocation with a native zip read operation, which looks significantly faster, especially while creating SBOM with evidence for large Java codebases.

We can backport this to 9.x, if there is any demand from evinse users.

prabhu added 11 commits January 27, 2024 12:17
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu prabhu merged commit e1e4958 into release/10.x Jan 27, 2024
15 of 16 checks passed
@prabhu prabhu deleted the feature/native-jar-parsing branch January 27, 2024 15:20
prabhu added a commit that referenced this pull request Jan 28, 2024
* Native jar parsing

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Reduce build artefacts

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Update maven plugin

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* deno tests

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
prabhu added a commit that referenced this pull request Jan 29, 2024
* Switch to java 21, node >= 20 (#816)

* Switch to java 21, node >= 20

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Use temurin

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* update atom

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Rebase from master

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* deno improvements (#832)

* Switch to java 21, node >= 20 (#816)

Prettier fixes

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

Test fixes

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

Enable deno lint

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Update workflow

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Native jar parsing (#833)

* Native jar parsing

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Reduce build artefacts

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Update maven plugin

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* deno tests

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Feature/cross plat builds (#836)

* Use matrix strategy to build native exes

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Remove xml format (#837)

* Lint fixes

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Remove xml generation support

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Lint fix (#831)

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Include git metadata under formulation (#839)

* Include git metadata under formulation

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* 1.4 fixes

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* git.js was matching git on windows and causing infinite loop :)

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Update java version

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* [cbom] OS crypto libraries (#842)

* cbom os queries

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Capture crypto libs under formulation

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Support for < 1.6 for cryptographic asset

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Publish images from release branches

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Feature/v10 tweaks (#844)

* Use package instead of name for portage

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Flatpak wip

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* dotnet dependency tree was getting lost without the type (#847)

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Fixes #848 in v10 (#850)

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Collect build context under formulation (#851)

* Temp commit

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Collect build tools information

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* disable flaky test

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Ignore additional types during tar extraction (#853)

* Ignore additional types during tar extraction

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

* Handle maven search timeout

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.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.

1 participant