Skip to content

Commit f7da044

Browse files
committed
feat(image): add syft and grype tooling
Add syft and grype as pinned image tools, wire Renovate version tracking, and document both CLIs in the runner tool list. Made-with: Cursor
1 parent 92dff3a commit f7da044

5 files changed

Lines changed: 43 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
### Added
1818

1919
* **runner:** export `${APP_HOME}/.local/bin` at image level so Poetry and UV are discoverable in both `sh` and `bash` execution contexts
20+
* **tools:** add `syft` and `grype` to the image with pinned versions, Renovate tracking, and documentation updates
2021

2122
### Changed
2223

Containerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@ RUN curl -fsSL https://aquasecurity.github.io/trivy-repo/deb/public.key \
4646
&& apt-get clean \
4747
&& rm -rf /var/lib/apt/lists/*
4848

49+
# Install syft (SBOM generator)
50+
ARG SYFT_VERSION=1.43.0
51+
RUN curl -sSL -o /tmp/syft.tgz \
52+
"https://github.com/anchore/syft/releases/download/v${SYFT_VERSION}/syft_${SYFT_VERSION}_linux_amd64.tar.gz" \
53+
&& tar -xzf /tmp/syft.tgz -C /tmp syft \
54+
&& mv /tmp/syft /usr/local/bin/syft \
55+
&& chmod +x /usr/local/bin/syft \
56+
&& rm -f /tmp/syft.tgz
57+
58+
# Install grype (vulnerability scanner)
59+
ARG GRYPE_VERSION=0.111.1
60+
RUN curl -sSL -o /tmp/grype.tgz \
61+
"https://github.com/anchore/grype/releases/download/v${GRYPE_VERSION}/grype_${GRYPE_VERSION}_linux_amd64.tar.gz" \
62+
&& tar -xzf /tmp/grype.tgz -C /tmp grype \
63+
&& mv /tmp/grype /usr/local/bin/grype \
64+
&& chmod +x /usr/local/bin/grype \
65+
&& rm -f /tmp/grype.tgz
66+
4967
# Install dive (container filesystem analysis)
5068
ARG DIVE_VERSION=0.13.1
5169
# hadolint ignore=DL3008

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ These tools allow the image to run its own build pipeline as a self-hosted runne
3434
| [buildah](https://github.com/containers/buildah) | OCI container image builder |
3535
| [dive](https://github.com/wagoodman/dive) | Container filesystem analysis |
3636
| [trivy](https://github.com/aquasecurity/trivy) | Vulnerability scanner |
37+
| [syft](https://github.com/anchore/syft) | Software bill of materials (SBOM) generator |
38+
| [grype](https://github.com/anchore/grype) | Container and SBOM vulnerability scanner |
3739
| [hadolint](https://github.com/hadolint/hadolint) | Dockerfile/Containerfile linter |
3840
| [yq](https://github.com/mikefarah/yq) | YAML processor |
3941
| [pre-commit](https://pre-commit.com/) | Git hooks framework |
@@ -106,6 +108,8 @@ build:
106108
- KARGO_VERSION=1.9.6
107109
- PACK_VERSION=0.40.2
108110
- DIVE_VERSION=0.13.1
111+
- SYFT_VERSION=1.43.0
112+
- GRYPE_VERSION=0.111.1
109113
- HADOLINT_VERSION=2.14.0
110114
- YQ_VERSION=4.53.2
111115
labels:

manifest.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ build:
1010
- KARGO_VERSION=1.9.6
1111
- PACK_VERSION=0.40.2
1212
- DIVE_VERSION=0.13.1
13+
- SYFT_VERSION=1.43.0
14+
- GRYPE_VERSION=0.111.1
1315
- HADOLINT_VERSION=2.14.0
1416
- YQ_VERSION=4.53.2
1517
labels:

renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@
2222
"datasourceTemplate": "github-releases",
2323
"extractVersionTemplate": "^v?(?<version>.+)$"
2424
},
25+
{
26+
"customType": "regex",
27+
"description": "Update Syft version",
28+
"fileMatch": ["^Containerfile$", "^manifest\\.yaml$"],
29+
"matchStrings": ["SYFT_VERSION=(?<currentValue>\\S+)"],
30+
"depNameTemplate": "anchore/syft",
31+
"datasourceTemplate": "github-releases",
32+
"extractVersionTemplate": "^v?(?<version>.+)$"
33+
},
34+
{
35+
"customType": "regex",
36+
"description": "Update Grype version",
37+
"fileMatch": ["^Containerfile$", "^manifest\\.yaml$"],
38+
"matchStrings": ["GRYPE_VERSION=(?<currentValue>\\S+)"],
39+
"depNameTemplate": "anchore/grype",
40+
"datasourceTemplate": "github-releases",
41+
"extractVersionTemplate": "^v?(?<version>.+)$"
42+
},
2543
{
2644
"customType": "regex",
2745
"description": "Update Hadolint version",

0 commit comments

Comments
 (0)