Skip to content

xpum/receiver: semantics doc update #6

xpum/receiver: semantics doc update

xpum/receiver: semantics doc update #6

name: Linux - xpumd
on:
push:
branches:
- main
- dev
- v2*
pull_request:
permissions:
contents: read
jobs:
checks:
runs-on: ${{ fromJson(vars.RUNS_ON) }}
steps:
- name: Check out code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Check modfiles
run: ./xpumd/scripts/make-dockerized.sh check-modfiles
- name: Golangci-lint
run: ./xpumd/scripts/make-dockerized.sh golint
- name: Run tests
run: ./xpumd/scripts/make-dockerized.sh test
- name: Verify generated assets
run: |
./xpumd/scripts/make-dockerized.sh generate
if ! git diff --quiet; then
echo "Generated assets are out of date. Please run make generate and commit the changes."
git --no-pager diff
exit 1
fi
trivy-scan-vuln:
runs-on: ${{ fromJson(vars.RUNS_ON) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run Trivy Fs Scan
continue-on-error: true
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
exit-code: 1
scan-type: fs
scanners: vuln,secret
list-all-pkgs: true
scan-ref: ./xpumd
format: json
output: trivy-report.json
- name: Print Trivy report in human-readable format
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
scan-type: convert
scanners: vuln,secret
image-ref: trivy-report.json
format: table
- name: Convert Trivy report to CSV format
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
scan-type: convert
image-ref: trivy-report.json
format: template
template: "@.github/workflows/trivy-csv.tpl"
output: trivy-xpumd-vuln-report.csv
- name: Upload Trivy report as artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: trivy-xpumd-vuln-report
path: trivy-xpumd-vuln-report.csv
trivy-scan-license:
runs-on: ${{ fromJson(vars.RUNS_ON) }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: xpumd/go.mod
- name: Warm up the gomod cache for the license scan
run: ./xpumd/scripts/trivy-warmup.sh
- name: Run Trivy License Scan
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
env:
TRIVY_IGNORED_LICENSES: MPL-2.0
with:
exit-code: 1
scan-type: fs
scanners: license
scan-ref: ./xpumd
skip-dirs: tools
severity: UNKNOWN,MEDIUM,HIGH,CRITICAL