Skip to content

Commit 886bcaa

Browse files
Cut a GitHub release from the rebuild, and pin the release workflow (#101)
Yesterday's rebuild cleared CVE-2026-14456 and published 2026.9.0, and the scan refiled that same CVE this morning (BEE-1172, BEE-1173). It never looked at the rebuilt image: secops resolves this product from our last two GitHub *releases* (localstack/secops, localstack_products.json: type=github, github_releases_fetch_limit=2), looking each release's tag_name up verbatim on Docker Hub. We pushed a bare git tag and no release, so the scan window stayed on v2026.8.0 -- and Docker Hub had no v2026.9.0 tag for it to resolve either, since the publish step minted only the bare version. So: publish v${NEW} alongside ${NEW}, and cut the release. Also move latest, which nothing in the scan reads but `docker pull` and the marketplace do -- it still points at the superseded 2026.8.0. type=sha stays dropped: the candidate is built from the commit before the version bump. This does not stop a *new* Alpine CVE being ticketed. localstack_products.json still has docker-desktop as rebuild_model=on-release, so classify_findings.py rule 3 tickets OS-layer findings instead of leaving them to the rebuild; that entry wants flipping to scheduled now that this workflow exists. Also SHA-pin build-push-docker.yml's five actions, at the versions Dependabot proposes in #100 -- that file has always used floating tags, and it is the one holding the Docker Hub credentials. Both tags already ship provenance attestations, so the major bumps do not change the published index shape.
1 parent 9b87223 commit 886bcaa

2 files changed

Lines changed: 21 additions & 11 deletions

File tree

‎.github/workflows/build-push-docker.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ jobs:
2020

2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v7
23+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2424

2525
- name: Download binaries
2626
run: bash downloadBinaries.sh
2727

2828
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v4
29+
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
3030

3131
- name: Login to Docker Hub
32-
uses: docker/login-action@v4
32+
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
3333
with:
3434
username: ${{ secrets.DOCKERHUB_USERNAME }}
3535
password: ${{ secrets.DOCKERHUB_TOKEN }}
3636

3737
- name: Extract Docker metadata
3838
id: meta
39-
uses: docker/metadata-action@v6
39+
uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
4040
with:
4141
images: localstack/localstack-docker-desktop
4242
tags: |
@@ -46,7 +46,7 @@ jobs:
4646
type=sha
4747
4848
- name: Build and push Docker image
49-
uses: docker/build-push-action@v7
49+
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
5050
with:
5151
context: .
5252
file: "./Dockerfile"

‎.github/workflows/security-rebuild.yml‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,23 +147,33 @@ jobs:
147147

148148
- name: Publish (multi-arch)
149149
# Published here rather than via build-push-docker.yml: GITHUB_TOKEN pushes don't trigger workflows.
150+
# v${NEW} is what the secops scan resolves; latest is what docker pull and the marketplace read.
150151
if: steps.delta.outputs.cleared == 'true' && !inputs.dry_run
151152
env:
152153
NEW: ${{ steps.bump.outputs.version }}
153154
run: |
154-
echo "Publishing ${PUBLISHED_IMAGE}:${NEW}, clearing:"; cat cleared.txt
155+
echo "Publishing ${PUBLISHED_IMAGE}:${NEW} (also v${NEW}, latest), clearing:"; cat cleared.txt
155156
docker buildx build --push --pull --no-cache \
156157
--platform "${PLATFORMS}" \
157-
--tag "${PUBLISHED_IMAGE}:${NEW}" .
158+
--tag "${PUBLISHED_IMAGE}:${NEW}" \
159+
--tag "${PUBLISHED_IMAGE}:v${NEW}" \
160+
--tag "${PUBLISHED_IMAGE}:latest" .
158161
159162
# After the publish on purpose: a failed publish must not leave TAG pointing at an unpushed image.
160-
- name: Commit and tag
163+
- name: Commit, tag and release
161164
if: steps.delta.outputs.cleared == 'true' && !inputs.dry_run
165+
env:
166+
NEW: ${{ steps.bump.outputs.version }}
167+
GH_TOKEN: ${{ github.token }}
162168
run: |
163169
git add Makefile Dockerfile CHANGELOG.md
164-
git commit -m "Security rebuild ${{ steps.bump.outputs.version }}"
165-
git tag "v${{ steps.bump.outputs.version }}"
166-
git push origin HEAD:main "v${{ steps.bump.outputs.version }}"
170+
git commit -m "Security rebuild ${NEW}"
171+
git tag "v${NEW}"
172+
git push origin HEAD:main "v${NEW}"
173+
174+
# The secops scan reads our GitHub releases, not our tags; a bare tag leaves it on the old version.
175+
gh release create "v${NEW}" --title "${NEW}" \
176+
--notes "Weekly security rebuild (COSY-926). Cleared: $(paste -sd', ' cleared.txt)."
167177
168178
- name: Summary
169179
if: always()

0 commit comments

Comments
 (0)