Skip to content

[scanner] fix: enable CodeQL SAST for JavaScript/TypeScript#6229

Merged
kubestellar-hive[bot] merged 3 commits into
mainfrom
scanner/docs-codeql
Jul 8, 2026
Merged

[scanner] fix: enable CodeQL SAST for JavaScript/TypeScript#6229
kubestellar-hive[bot] merged 3 commits into
mainfrom
scanner/docs-codeql

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Summary

Activates the dormant codeql.yml.disabled workflow by renaming it to codeql.yml, enabling CodeQL static analysis for JavaScript/TypeScript.

The workflow:

  • Runs on every push to main, every PR targeting main, and weekly (Monday 04:00 UTC)
  • Uses the security-and-quality query suite (covers injection, XSS, prototype pollution, etc.)
  • Already uses pinned SHA refs for all actions
  • Minimal permissions: contents:read at top level, security-events:write at job level (to upload SARIF)

This addresses the gap identified in #6221 — Next.js API routes and the MDX sanitizer were not covered by any SAST tool. CodeQL will now analyze src/app/api/search/route.ts and other server-side TypeScript on every PR.

Test plan

  • CI passes; CodeQL "Analyze (javascript-typescript)" job succeeds
  • Security tab shows a new CodeQL code scanning tool
  • Confirm SARIF is uploaded to the Security → Code scanning alerts tab

Fixes #6221

🤖 Generated with Claude Code

Renames the dormant codeql.yml.disabled to codeql.yml, activating
CodeQL analysis for JavaScript/TypeScript on every push to main,
every PR, and on a weekly schedule (Monday 04:00 UTC).

The workflow already uses pinned SHA refs for all actions, sets
minimal permissions (contents:read at top level, security-events:write
at job level), and runs the 'security-and-quality' query suite which
covers injection, XSS, and similar vulnerabilities in Next.js API routes
and the MDX sanitizer identified in the issue.

Fixes #6221

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: scanner <scanner@kubestellar.io>
Copilot AI review requested due to automatic review settings July 8, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot can't review bot-authored pull requests automatically. A user with Copilot access can request a review manually.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jul 8, 2026
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellar-docs ready!

Name Link
🔨 Latest commit f3bdaf7
🔍 Latest deploy log https://app.netlify.com/projects/kubestellar-docs/deploys/6a4dcfc180a6510008be148d
😎 Deploy Preview https://deploy-preview-6229--kubestellar-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 8, 2026
@kubestellar-prow kubestellar-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 8, 2026
@kubestellar-prow

Copy link
Copy Markdown

Hi @kubestellar-hive[bot]. Thanks for your PR.

I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
The docs repository has GitHub's default CodeQL setup enabled in Settings.
Advanced CodeQL workflow files cannot coexist with the default setup —
GitHub rejects the SARIF upload with:
  'CodeQL analyses from advanced configurations cannot be processed
   when the default setup is enabled.'

The default setup already runs CodeQL for JavaScript/TypeScript (confirmed
by the 'CodeQL' check showing on PRs). This advanced workflow is redundant
and causes CI failures. Removing it; the existing default setup provides
the SAST coverage the scanner was trying to add.

Closes: the CI failure on PR #6229.

Signed-off-by: kubestellar-hive[bot] <197575415+kubestellar-hive[bot]@users.noreply.github.com>
Signed-off-by: kubestellar-hive[bot] <kubestellar-hive[bot]@users.noreply.github.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2026
@kubestellar-hive
kubestellar-hive Bot merged commit 7b241b4 into main Jul 8, 2026
11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/docs-codeql branch July 8, 2026 04:57
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

Check out what's new:

Stay connected: Slack #kubestellar-dev | Multi-Cluster Survey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd copilot dco-signoff: yes Indicates the PR's author has signed the DCO. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. yaml

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] docs: no SAST tool configured — Next.js API routes not analyzed for injection vulnerabilities

1 participant