Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,21 @@ jobs:
echo "a refresh pull request covered these findings this week"
exit 0
fi
version=$(cat VERSION)
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "unexpected VERSION '$version'"; exit 1; }
next="${version%.*}.$((${version##*.} + 1))"
branch="refresh-$(date -u +%Y%m%d%H%M)"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git switch -c "$branch"
date -u +%Y-%m-%dT%H:%M:%SZ >REFRESH
echo "$next" >VERSION
base=gcr.io/distroless/cc-debian13:latest
digest=$(docker buildx imagetools inspect "$base" --format '{{json .Manifest}}' | jq -r .digest)
case "$digest" in sha256:*) sed -i "s#^FROM $base@sha256:[0-9a-f]*#FROM $base@$digest#" Dockerfile ;; esac
git commit -am "build(debian): refresh packages"
git commit -am "build: $next, refresh packages"
git push origin "$branch"
gh pr create --base main --head "$branch" --title "build(debian): refresh packages" --label security --body-file body.md
gh pr create --base main --head "$branch" --title "build: $next, refresh packages" --label security --body-file body.md
gh workflow run build.yml --ref "$branch"

unfixed:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Web server image for the [Ingrest](https://github.com/ingrest-dev) panel: nginx
- A module pull request lists the compared commits and the repository's published security advisories since the pin, and is labelled `security` when a commit names a CVE, an advisory, a memory safety fix or a bypass.
- Modules tracked by tags move to their default branch when it has fix commits (not docs, ci, tests) past the pin and the newest tag whose subjects match those words: such fixes can wait months for a release.
- `scan` also keeps one issue, "Unfixed vulnerabilities in linked libraries": HIGH or CRITICAL findings without a Debian fix in packages that nginx, its modules or libmodsecurity load. Ids checked as not affecting the image go to `tools/watch/unfixed.ignore` with the reason.
- `scan` runs Trivy on the newest published image every 6 hours: fixable HIGH or CRITICAL Debian packages open a `security` pull request that changes `REFRESH`, which makes the runtime stage reinstall and upgrade its packages.
- `scan` runs Trivy on the newest published image every 6 hours: fixable HIGH or CRITICAL Debian packages open a `security` pull request that changes `REFRESH`, which makes the runtime stage reinstall and upgrade its packages, and bumps the build in `VERSION`.
- `patches/` is for emergencies only (see `patches/README.md`).

## Releases
Expand Down
2 changes: 1 addition & 1 deletion tools/watch/scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ The published image \`$image\` has fixable HIGH or CRITICAL vulnerabilities in D
| --- | --- | --- | --- | --- |
$rows

This pull request changes \`REFRESH\`, so the runtime stage downloads current packages instead of its cached layer, and moves the distroless base to its newest digest.
This pull request changes \`REFRESH\`, so the runtime stage downloads current packages instead of its cached layer, moves the distroless base to its newest digest and bumps the build number in \`VERSION\`.
EOF