mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 15:06:36 +01:00
fix:handle compound aliases like ``.tgz`` when cataloging archives (#4421)
--------- Signed-off-by: Yuntao Hu <victorhu493@gmail.com> Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> Co-authored-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
co-authored by
Christopher Phillips
parent
d37ed567a8
commit
afe28a2fc0
@@ -32,6 +32,13 @@ func Test_parseTarWrappedJavaArchive(t *testing.T) {
|
||||
"joda-time",
|
||||
},
|
||||
},
|
||||
{
|
||||
fixture: "test-fixtures/java-builds/packages/example-java-app-maven-0.1.0.tgz",
|
||||
expected: []string{
|
||||
"example-java-app-maven",
|
||||
"joda-time",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(path.Base(test.fixture), func(t *testing.T) {
|
||||
|
||||
@@ -16,7 +16,7 @@ fingerprint: $(FINGERPRINT_FILE)
|
||||
|
||||
jars: $(PKGSDIR)/example-java-app-maven-0.1.0.jar $(PKGSDIR)/example-java-app-gradle-0.1.0.jar $(PKGSDIR)/example-jenkins-plugin.hpi $(PKGSDIR)/spring-boot-0.0.1-SNAPSHOT.jar
|
||||
|
||||
archives: $(PKGSDIR)/example-java-app-maven-0.1.0.zip $(PKGSDIR)/example-java-app-maven-0.1.0.tar $(PKGSDIR)/example-java-app-maven-0.1.0.tar.gz
|
||||
archives: $(PKGSDIR)/example-java-app-maven-0.1.0.zip $(PKGSDIR)/example-java-app-maven-0.1.0.tar $(PKGSDIR)/example-java-app-maven-0.1.0.tar.gz $(PKGSDIR)/example-java-app-maven-0.1.0.tgz
|
||||
|
||||
native-image: $(PKGSDIR)/example-java-app $(PKGSDIR)/gcc-amd64-darwin-exec-debug
|
||||
|
||||
@@ -31,6 +31,9 @@ $(PKGSDIR)/example-java-app-maven-0.1.0.tar: $(PKGSDIR)/example-java-app-maven-0
|
||||
$(PKGSDIR)/example-java-app-maven-0.1.0.tar.gz: $(PKGSDIR)/example-java-app-maven-0.1.0.jar
|
||||
tar -czvf $(PKGSDIR)/example-java-app-maven-0.1.0.tar.gz $(PKGSDIR)/example-java-app-maven-0.1.0.jar
|
||||
|
||||
$(PKGSDIR)/example-java-app-maven-0.1.0.tgz: $(PKGSDIR)/example-java-app-maven-0.1.0.tar.gz
|
||||
tar -czf $(PKGSDIR)/example-java-app-maven-0.1.0.tgz $(PKGSDIR)/example-java-app-maven-0.1.0.jar
|
||||
|
||||
# Nested jar...
|
||||
|
||||
$(PKGSDIR)/spring-boot-0.0.1-SNAPSHOT.jar:
|
||||
|
||||
Reference in New Issue
Block a user