Compare commits

...
3 Commits
Author SHA1 Message Date
Aibek 9ab158e859 Add 0.34.0 release (#177)
* bump to ghcr.io/aquasecurity/trivy:0.33.0

* fix tests

* bump to 0.34.0
2022-10-31 17:18:27 -07:00
Lior Vaisman Argon e55de85bee Add npm to action Dockerfile (#176) 2022-10-25 07:04:22 -07:00
chejn d63413b0a4 Fix github dependency submission API call (#162)
* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh
2022-08-17 14:54:57 -07:00
11 changed files with 24 additions and 13 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: "build" name: "build"
on: [push, pull_request] on: [push, pull_request]
env: env:
TRIVY_VERSION: 0.31.2 TRIVY_VERSION: 0.34.0
BATS_LIB_PATH: '/usr/lib/' BATS_LIB_PATH: '/usr/lib/'
jobs: jobs:
build: build:
+2 -2
View File
@@ -1,5 +1,5 @@
FROM ghcr.io/aquasecurity/trivy:0.31.2 FROM ghcr.io/aquasecurity/trivy:0.34.0
COPY entrypoint.sh / COPY entrypoint.sh /
RUN apk --no-cache add bash curl RUN apk --no-cache add bash curl npm
RUN chmod +x /entrypoint.sh RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
+1 -1
View File
@@ -186,7 +186,7 @@ fi
if [[ "${format}" == "github" ]]; then if [[ "${format}" == "github" ]]; then
if [[ "$(echo $githubPAT | xargs)" != "" ]]; then if [[ "$(echo $githubPAT | xargs)" != "" ]]; then
printf "\n Uploading GitHub Dependency Snapshot" printf "\n Uploading GitHub Dependency Snapshot"
curl -u "${githubPAT}" -H 'Content-Type: application/json' 'https://api.github.com/repos/'$GITHUB_REPOSITORY'/dependency-graph/snapshots' -d @./$(echo $output | xargs) curl -H 'Accept: application/vnd.github+json' -H "Authorization: token $githubPAT" 'https://api.github.com/repos/'$GITHUB_REPOSITORY'/dependency-graph/snapshots' -d @./$(echo $output | xargs)
else else
printf "\n Failing GitHub Dependency Snapshot. Missing github-pat" printf "\n Failing GitHub Dependency Snapshot. Missing github-pat"
fi fi
+5 -2
View File
@@ -13,7 +13,7 @@
"id": "DS002", "id": "DS002",
"name": "Misconfiguration", "name": "Misconfiguration",
"shortDescription": { "shortDescription": {
"text": "DS002" "text": "Image user should not be \u0026#39;root\u0026#39;"
}, },
"fullDescription": { "fullDescription": {
"text": "Running containers with \u0026#39;root\u0026#39; 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 \u0026#39;USER\u0026#39; statement to the Dockerfile." "text": "Running containers with \u0026#39;root\u0026#39; 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 \u0026#39;USER\u0026#39; statement to the Dockerfile."
@@ -37,7 +37,7 @@
} }
} }
], ],
"version": "0.31.2" "version": "0.34.0"
} }
}, },
"results": [ "results": [
@@ -61,6 +61,9 @@
"endLine": 1, "endLine": 1,
"endColumn": 1 "endColumn": 1
} }
},
"message": {
"text": "Dockerfile"
} }
} }
] ]
+1
View File
@@ -28,6 +28,7 @@
{ {
"Type": "Dockerfile Security Check", "Type": "Dockerfile Security Check",
"ID": "DS002", "ID": "DS002",
"AVDID": "AVD-DS-0002",
"Title": "Image user should not be 'root'", "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.", "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", "Message": "Specify at least 1 USER command in Dockerfile with non-root user as argument",
+1
View File
@@ -28,6 +28,7 @@
{ {
"Type": "Dockerfile Security Check", "Type": "Dockerfile Security Check",
"ID": "DS002", "ID": "DS002",
"AVDID": "AVD-DS-0002",
"Title": "Image user should not be 'root'", "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.", "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", "Message": "Specify at least 1 USER command in Dockerfile with non-root user as argument",
+1 -1
View File
@@ -37,7 +37,7 @@
} }
} }
], ],
"version": "0.31.2" "version": "0.34.0"
} }
}, },
"results": [ "results": [
+5 -2
View File
@@ -75,12 +75,15 @@ Total: 19 (CRITICAL: 19)
rust-app/Cargo.lock (cargo) rust-app/Cargo.lock (cargo)
=========================== ===========================
Total: 1 (CRITICAL: 1) Total: 2 (CRITICAL: 2)
┌──────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐ ┌──────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │ │ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├──────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤ ├──────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ smallvec │ CVE-2021-25900 │ CRITICAL │ 0.6.9 │ 0.6.14, 1.6.1 │ An issue was discovered in the smallvec crate before 0.6.14 │ │ openssl │ CVE-2018-20997 │ CRITICAL │ 0.8.3 │ 0.10.9 │ Use after free in openssl │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2018-20997 │
├──────────┼────────────────┤ ├───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ smallvec │ CVE-2021-25900 │ │ 0.6.9 │ 1.6.1, 0.6.14 │ An issue was discovered in the smallvec crate before 0.6.14 │
│ │ │ │ │ │ and 1.x... │ │ │ │ │ │ │ and 1.x... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25900 │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25900 │
└──────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘ └──────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘
+6 -3
View File
@@ -75,12 +75,15 @@ Total: 19 (CRITICAL: 19)
rust-app/Cargo.lock (cargo) rust-app/Cargo.lock (cargo)
=========================== ===========================
Total: 4 (CRITICAL: 4) Total: 5 (CRITICAL: 5)
┌───────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐ ┌───────────┬────────────────┬──────────┬───────────────────┬───────────────┬─────────────────────────────────────────────────────────────┐
│ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │ │ Library │ Vulnerability │ Severity │ Installed Version │ Fixed Version │ Title │
├───────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤ ├───────────┼────────────────┼──────────┼───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ rand_core │ CVE-2020-25576 │ CRITICAL │ 0.4.0 │ 0.3.1, 0.4.2 │ An issue was discovered in the rand_core crate before 0.4.2 │ │ openssl │ CVE-2018-20997 │ CRITICAL │ 0.8.3 │ 0.10.9 │ Use after free in openssl │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2018-20997 │
├───────────┼────────────────┤ ├───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
│ rand_core │ CVE-2020-25576 │ │ 0.4.0 │ 0.3.1, 0.4.2 │ An issue was discovered in the rand_core crate before 0.4.2 │
│ │ │ │ │ │ for Rust.... │ │ │ │ │ │ │ for Rust.... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2020-25576 │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2020-25576 │
├───────────┼────────────────┤ ├───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤ ├───────────┼────────────────┤ ├───────────────────┼───────────────┼─────────────────────────────────────────────────────────────┤
@@ -92,7 +95,7 @@ Total: 4 (CRITICAL: 4)
│ │ │ │ │ │ for Rust.... │ │ │ │ │ │ │ for Rust.... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2019-15554 │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2019-15554 │
│ ├────────────────┤ │ ├───────────────┼─────────────────────────────────────────────────────────────┤ │ ├────────────────┤ │ ├───────────────┼─────────────────────────────────────────────────────────────┤
│ │ CVE-2021-25900 │ │ │ 0.6.14, 1.6.1 │ An issue was discovered in the smallvec crate before 0.6.14 │ │ │ CVE-2021-25900 │ │ │ 1.6.1, 0.6.14 │ An issue was discovered in the smallvec crate before 0.6.14 │
│ │ │ │ │ │ and 1.x... │ │ │ │ │ │ │ and 1.x... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25900 │ │ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-25900 │
└───────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘ └───────────┴────────────────┴──────────┴───────────────────┴───────────────┴─────────────────────────────────────────────────────────────┘
-1
View File
@@ -69,7 +69,6 @@
] ]
}, },
"Match": "export GITHUB_PAT=****************************************", "Match": "export GITHUB_PAT=****************************************",
"Deleted": false,
"Layer": {} "Layer": {}
} }
] ]
+1
View File
@@ -60,6 +60,7 @@
"Vulnerabilities": [ "Vulnerabilities": [
{ {
"VulnerabilityID": "CVE-2021-36159", "VulnerabilityID": "CVE-2021-36159",
"PkgID": "apk-tools@2.10.6-r0",
"PkgName": "apk-tools", "PkgName": "apk-tools",
"InstalledVersion": "2.10.6-r0", "InstalledVersion": "2.10.6-r0",
"FixedVersion": "2.10.7-r0", "FixedVersion": "2.10.7-r0",