Skip to content

ci: pin more dependencies and configure CodeQL checks - #11777

Merged
julian-risch merged 6 commits into
mainfrom
security/scorecard-pinned-deps-and-sast
Jun 25, 2026
Merged

ci: pin more dependencies and configure CodeQL checks#11777
julian-risch merged 6 commits into
mainfrom
security/scorecard-pinned-deps-and-sast

Conversation

@julian-risch

@julian-risch julian-risch commented Jun 25, 2026

Copy link
Copy Markdown
Member

Related Issues

Proposed Changes:

  • Pinned-Dependencies — pin the base images in docker/Dockerfile.base by digest via ${...} args (containerImage 1/3 → 3/3), pin actionlint to v1.7.12 (go 0/1 → 1/1), and use npm ci in docs_search_sync.yml (npm 0/1 → 1/1).
  • SAST — add a committed CodeQL workflow instead of GitHub Web UI config of CodeQL so the check is reliably credited on PRs before merging not after

How did you test it?

Notes for the reviewer

  • I disabled CodeQL setup in GitHub Web UI again because GitHub does not seem to allow web UI default + advanced setup via workflow file together.

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I've used a conventional commit type for my PR title (ci:).
  • I have documented my code.
  • I have run pre-commit hooks and fixed any issue.
  • Release note — N/A (CI-only, not user-facing).
  • Unit tests — N/A (CI configuration only).

julian-risch and others added 2 commits June 25, 2026 16:36
Improves the OpenSSF Scorecard Pinned-Dependencies check:

- docker/Dockerfile.base: give build_image/base_image pinned digest
  defaults and reference them as ${...} so scorecard resolves the FROM
  images by hash (containerImage 1/3 -> 3/3). docker-bake.hcl still
  overrides them at build time.
- workflows_linting.yml: pin actionlint to v1.7.12 instead of @latest
  (goCommand 0/1 -> 1/1; scorecard treats full semver as pinned).
- docs_search_sync.yml: use `npm ci` instead of `npm install` so the
  install verifies the committed lockfile (npmCommand 0/1 -> 1/1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a committed CodeQL workflow (advanced setup) that runs on push and
pull_request to main plus a weekly schedule, so the OpenSSF Scorecard
SAST check reliably credits CodeQL via both its workflow-config and
runs-on-commits probes. GitHub's "default setup" has no workflow file
and is not consistently detected (see ossf/scorecard#3817).

Action versions are SHA-pinned and kept fresh by Dependabot.

Note: CodeQL default setup must be disabled in repo settings before
merging, since GitHub does not allow default and advanced setup together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Jun 25, 2026 3:39pm

Request Review

@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@julian-risch julian-risch changed the title ci: improve OpenSSF Scorecard (pin dependencies + CodeQL SAST) ci: pin more dependencies and configure CodeQL checks Jun 25, 2026
@julian-risch
julian-risch marked this pull request as ready for review June 25, 2026 14:50
@julian-risch
julian-risch requested a review from a team as a code owner June 25, 2026 14:50
@julian-risch
julian-risch requested review from davidsbatista and removed request for a team June 25, 2026 14:50
julian-risch and others added 2 commits June 25, 2026 17:26
Addresses review feedback:

- codeql.yml: add a concurrency group (cancel superseded runs) and
  timeout-minutes: 360 as a guard against a hung analysis.
- codeql.yml: bump github/codeql-action from v3.27.0 to v3.36.2 (still
  SHA-pinned; kept fresh by Dependabot's github-actions updater).
- dependabot.yml: correct the docker comment -- Dependabot does not parse
  images that reach FROM via an ARG, so the build_image/base_image ARG
  defaults in Dockerfile.base are not auto-tracked and must be bumped by
  hand and kept in sync with docker/docker-bake.hcl.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Keeps github/codeql-action pinned to the same commit across both
workflows so Dependabot bumps them together.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@julian-risch
julian-risch enabled auto-merge (squash) June 25, 2026 15:39
@julian-risch
julian-risch merged commit 1115e7d into main Jun 25, 2026
21 checks passed
@julian-risch
julian-risch deleted the security/scorecard-pinned-deps-and-sast branch June 25, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants