Skip to content

Commit

Permalink
fix: upgrade mvn-plugin to handle jar scanning sha-not-found error
Browse files Browse the repository at this point in the history
  • Loading branch information
orsagie committed Nov 21, 2024
1 parent 71c1b7f commit c8f5969
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"snyk-go-plugin": "1.23.0",
"snyk-gradle-plugin": "4.7.0",
"snyk-module": "3.1.0",
"snyk-mvn-plugin": "3.6.0",
"snyk-mvn-plugin": "3.6.1",
"snyk-nodejs-lockfile-parser": "1.58.10",
"snyk-nodejs-plugin": "1.3.4",
"snyk-nuget-plugin": "2.7.12",
Expand Down
Binary file added test/fixtures/maven-jars/mvn-app-1.0-SNAPSHOT.jar
Binary file not shown.
11 changes: 11 additions & 0 deletions test/jest/acceptance/snyk-sbom/maven-options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ describe('snyk sbom: maven options (mocked server only)', () => {
);
});

test('`sbom --scan-unmanaged --file=<NAME>` fails to generate an SBOM for user defined JAR file', async () => {
const sbom = await runSnykSbomCliCycloneDxJsonForFixture(
'maven-jars',
'--scan-unmanaged --file=mvn-app-1.0-SNAPSHOT.jar',
env,
);

expect(sbom.metadata.component.name).toMatch(/^snyk-test-maven-jars-/);
expect(sbom.components.length).toBe(2);
});

test('`sbom --scan-unmanaged --file=<NAME>` generates an SBOM for the specific JAR file', async () => {
const sbom = await runSnykSbomCliCycloneDxJsonForFixture(
'maven-jars',
Expand Down

0 comments on commit c8f5969

Please sign in to comment.