Skip to content

fix(ci): validate untrusted workflow identifiers - #19

Merged
aksOps merged 3 commits into
mainfrom
fix/sonar-control-plane-hardening
Aug 1, 2026
Merged

fix(ci): validate untrusted workflow identifiers#19
aksOps merged 3 commits into
mainfrom
fix/sonar-control-plane-hardening

Conversation

@aksOps

@aksOps aksOps commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate GitHub API path identifiers before any network request
  • terminate Git revision options before validating candidate commits
  • add hostile fixtures for injected repository and revision inputs

Verification

  • python3 scripts/ci/test_validate_coverage_artifact.py
  • node scripts/ci/test_validate_workflow_run.cjs
  • python3 scripts/ci/test_workflow_structure.py
  • git diff --check

const path = segments.map((segment, index) => githubPathIdentifier(segment, `GitHub API path segment ${index + 1}`)).join('/');
apiUrl.pathname = `${apiUrl.pathname.replace(/\/+$/, '')}/${path}`;
for (const [key, value] of Object.entries(query)) apiUrl.searchParams.set(key, String(value));
const response = await fetch(apiUrl, {
@aksOps
aksOps merged commit cd3466d into main Aug 1, 2026
11 checks passed
@sonarqubecloud

sonarqubecloud Bot commented Aug 1, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@aksOps
aksOps deleted the fix/sonar-control-plane-hardening branch August 1, 2026 15:10
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