-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix --file-patterns flag (#2625)
- Loading branch information
Showing
4 changed files
with
87 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"SchemaVersion": 2, | ||
"ArtifactName": "testdata/fixtures/fs/dockerfile_file_pattern", | ||
"ArtifactType": "filesystem", | ||
"Metadata": { | ||
"ImageConfig": { | ||
"architecture": "", | ||
"created": "0001-01-01T00:00:00Z", | ||
"os": "", | ||
"rootfs": { | ||
"type": "", | ||
"diff_ids": null | ||
}, | ||
"config": {} | ||
} | ||
}, | ||
"Results": [ | ||
{ | ||
"Target": "Customfile", | ||
"Class": "config", | ||
"Type": "dockerfile", | ||
"MisconfSummary": { | ||
"Successes": 21, | ||
"Failures": 1, | ||
"Exceptions": 0 | ||
}, | ||
"Misconfigurations": [ | ||
{ | ||
"Type": "Dockerfile Security Check", | ||
"ID": "DS002", | ||
"Title": "Image user should not be 'root'", | ||
"Description": "Running containers with 'root' user can lead to a container escape situation. It is a best practice to run containers as non-root users, which can be done by adding a 'USER' statement to the Dockerfile.", | ||
"Message": "Specify at least 1 USER command in Dockerfile with non-root user as argument", | ||
"Namespace": "builtin.dockerfile.DS002", | ||
"Query": "data.builtin.dockerfile.DS002.deny", | ||
"Resolution": "Add 'USER \u003cnon root user name\u003e' line to the Dockerfile", | ||
"Severity": "HIGH", | ||
"PrimaryURL": "https://avd.aquasec.com/misconfig/ds002", | ||
"References": [ | ||
"https://docs.docker.com/develop/develop-images/dockerfile_best-practices/", | ||
"https://avd.aquasec.com/misconfig/ds002" | ||
], | ||
"Status": "FAIL", | ||
"Layer": {}, | ||
"CauseMetadata": { | ||
"Provider": "Dockerfile", | ||
"Service": "general", | ||
"Code": { | ||
"Lines": null | ||
} | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
integration/testdata/fixtures/fs/dockerfile_file_pattern/Customfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM alpine:3.13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters