Compare commits
3 Commits
10.0.16
...
e6c28c3b15
| Author | SHA1 | Date | |
|---|---|---|---|
|
e6c28c3b15
|
|||
|
d2824d0831
|
|||
|
fb51b8e9da
|
@@ -1,6 +1,6 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
archs = ["amd64", "arm64"] ## arm
|
archs = ["amd64", "arm64"] ## arm
|
||||||
glpi_version = "10.0.16"
|
glpi_version = "10.0.17"
|
||||||
alpine_version = "3.20"
|
alpine_version = "3.20"
|
||||||
|
|
||||||
out = []
|
out = []
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: Vulnerability Scan
|
name: Vulnerability Scan
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -16,14 +17,36 @@ jobs:
|
|||||||
- name: Pull docker image
|
- name: Pull docker image
|
||||||
run: docker pull docker.asperti.com/paspo/glpi:latest
|
run: docker pull docker.asperti.com/paspo/glpi:latest
|
||||||
|
|
||||||
|
- name: Setup trivy
|
||||||
|
run: |
|
||||||
|
echo "Installing Trivy for arch: $(uname -m)"
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64)
|
||||||
|
wget -O /tmp/trivy.deb https://github.com/aquasecurity/trivy/releases/download/v0.58.2/trivy_0.58.2_Linux-64bit.deb ;;
|
||||||
|
aarch64)
|
||||||
|
wget -O /tmp/trivy.deb https://github.com/aquasecurity/trivy/releases/download/v0.58.2/trivy_0.58.2_Linux-ARM64.deb ;;
|
||||||
|
*) exit 1 ;;
|
||||||
|
esac
|
||||||
|
dpkg -i /tmp/trivy.deb
|
||||||
|
|
||||||
- name: Run Trivy vulnerability scanner
|
- name: Run Trivy vulnerability scanner
|
||||||
id: scan
|
id: scan
|
||||||
uses: aquasecurity/trivy-action@master
|
run: |
|
||||||
with:
|
trivy --server ${{ secrets.TRIVY_SERVER }} --token ${{ secrets.TRIVY_TOKEN }} image --format json docker.asperti.com/paspo/glpi:latest > trivy-results.json
|
||||||
image-ref: "docker.asperti.com/paspo/glpi:latest"
|
|
||||||
format: "json"
|
|
||||||
output: "trivy-results.json"
|
|
||||||
|
|
||||||
# if some vulnerability is found, we fail
|
# if some vulnerability is found, we fail
|
||||||
- name: check output
|
- name: check output
|
||||||
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
id: vulncount
|
||||||
|
run: |
|
||||||
|
echo "VULNCOUNT=$(jq '.Results[0].Vulnerabilities|length' trivy-results.json)" >> ${GITHUB_OUTPUT}
|
||||||
|
if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||||
|
|
||||||
|
- name: send telegram notification
|
||||||
|
if: failure()
|
||||||
|
uses: appleboy/telegram-action@master
|
||||||
|
with:
|
||||||
|
to: ${{ secrets.TELEGRAM_TO }}
|
||||||
|
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||||
|
format: markdown
|
||||||
|
message: |
|
||||||
|
Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ github.repository }}`
|
||||||
|
|||||||
Reference in New Issue
Block a user