Resolves the open OpenSSF Scorecard code-scanning alerts that a change in this repository can fix:
- PinnedDependencies: every GitHub-owned action is pinned by commit SHA (actions/checkout v7.0.1, github/codeql-action init, analyze and upload-sarif v4.39.5); scorecard.yml carried checkout v7.0.0 under a wrong v4.2.2 comment. Dependabot keeps the pins current.
- TokenPermissions: mark-stable, publish-containers and security-codeql get a top-level contents: read; every job there already declares its own permissions, so no job token changes.
- SecurityPolicy: .github/SECURITY.md with private reporting via GitHub advisories.
Left open on purpose: the job-level write permissions those jobs need, the Dockerfile FROM ${BASE_IMAGE} that scripts/build/base.sh resolves per distro, and the repository-setting checks.
| Fix | Break | Tokens | Velocity | Security | Score |
| --- | --- | --- | --- | --- | --- |
| 93 % | 3 % | 100 % | 100 % | 100 % | 90 |
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Docker Linter
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint-docker:
|
|
name: Lint Dockerfile
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Run hadolint (produce SARIF)
|
|
id: hadolint
|
|
continue-on-error: true
|
|
uses: hadolint/hadolint-action@06be81baf89a55ffd0e24b8f04a4185738dd3387
|
|
with:
|
|
dockerfile: ./Dockerfile
|
|
format: sarif
|
|
output-file: hadolint-results.sarif
|
|
failure-threshold: warning
|
|
|
|
- name: Upload analysis results to GitHub
|
|
if: always()
|
|
uses: github/codeql-action/upload-sarif@915412ff23e8b7659517e607487dbeae018f2934 # v4.39.5
|
|
with:
|
|
sarif_file: hadolint-results.sarif
|
|
wait-for-processing: true
|
|
category: hadolint
|
|
|
|
- name: Fail if SARIF contains warnings or errors
|
|
if: always()
|
|
run: python3 src/pkgmgr/github/check_hadolint_sarif.py hadolint-results.sarif
|