Skip to content

Add Dependabot and CodeQL; harden workflow checkouts - #16

Merged
CptNope merged 2 commits into
mainfrom
dependabot-hardening
Nov 6, 2026
Merged

CptNope merged 2 commits into
mainfrom
dependabot-hardening

Conversation

@CptNope

@CptNope CptNope commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Supply-chain upkeep for the repository. No plugin code changes and no version bump, so merging doesn't release anything.

  • Dependabot (.github/dependabot.yml): watches the GitHub Actions, which are the only dependencies here; the plugin ships no Composer or npm code.
    • One grouped PR a week (Mondays), with the ci: prefix and dependencies / github-actions labels.
    • A 7-day cooldown, so a freshly hijacked action release can't reach CI or the release pipeline the day it's published. Security updates aren't delayed.
  • CodeQL for workflows (codeql.yml): CodeQL has no PHP support, but it analyses GitHub Actions workflows for script injection from untrusted input, over-broad token permissions and risky triggers (the security-extended queries). It runs on PRs that touch .github/, on main, and weekly, and results go to the Security tab.
  • Exact versions on every pin: each uses: line now has its version comment (# v5.1.0, # 2.40.0, # v1.1.9…), so Dependabot can label its PRs and keep the comments right. The header notes listing versions, which would have gone stale, are gone.
  • persist-credentials: false on every checkout: the workflow token no longer sits in .git/config for later steps to read. No job pushes through it: the wiki job clones with its own token, and releases use gh.

Generated by Claude Code

- .github/dependabot.yml: weekly grouped updates for the GitHub Actions
  (the repository's only dependencies), with a 7-day cooldown so a
  hijacked release has time to be caught.
- CodeQL workflow analysing the workflows themselves (script injection,
  token permissions); runs on workflow changes and weekly.
- Every action pin carries its exact version (v5.1.0, 2.40.0, ...) so
  Dependabot can label and update it; stale version notes removed.
- actions/checkout no longer stores the token in .git/config
  (persist-credentials: false); no job pushes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ejUFSkKi2KuJi647biNmu
@github-advanced-security

Copy link
Copy Markdown

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.

Makes the existing guard explicit (event, branch and repository) on both
jobs, as CodeQL's untrusted-checkout query expects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ejUFSkKi2KuJi647biNmu
@CptNope
CptNope merged commit aaff95b into main Nov 6, 2026
22 checks passed
@CptNope
CptNope deleted the dependabot-hardening branch November 6, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants