Skip to content

Promote CI pipeline hardening to main (#470) - #471

Merged
jeffreyaven merged 2 commits into
mainfrom
dev
Sep 30, 2026
Merged

jeffreyaven merged 2 commits into
mainfrom
dev

Conversation

@jeffreyaven

Copy link
Copy Markdown
Member

Promotes #470 from dev to main.

Hardens the post-merge build pipeline against contributor-controlled input: $GITHUB_ENV is written directly instead of through shell echo, provider directory and service file names are allowlisted, symlinks under providers/src are rejected before signing, and tar extraction uses filter='data'. No provider content changes.

Reported by Kevin Backhouse (GitHub Security Lab). Details, verification and reviewer notes are in #470.

🤖 Generated with Claude Code

jeffreyaven and others added 2 commits October 1, 2026 08:54
Contributor-controlled data (branch names, PR titles, provider directory
and service file names) reached /bin/sh via exec/os.system in the setup
and signing scripts, and symlinks under providers/src were dereferenced
by the update, sign and package steps of the post-merge build.

- setup-job.js / get-version.js: write REG_* via core.exportVariable,
  parse the PR number with an anchored regex for GitHub merge and squash
  subjects and require it to be numeric
- get-updated-providers.py: write PROVIDERS / NUM_PROVIDERS directly to
  $GITHUB_ENV in heredoc form; accept only
  providers/src/<provider>/<version>/{provider.yaml,services/<file>}
  with every component matching [A-Za-z0-9_][A-Za-z0-9._-]*
- new scripts/common/provider_tree.py: shared name allowlist, symlink /
  regular-file / containment checks, GITHUB_ENV writer, S3 key parser
- update-versions.py, sign-provider-docs.py: validate the provider tree
  before reading it; shutil.copyfile instead of os.system("cp ...")
- simulate-REGISTRY-PULL.py: tarfile extractall with filter='data'
- pull-additional-docs-from-artifact-repo.py: validate artifact keys
  before joining them onto local paths
- sign-file.sh, main.yml: quote arguments
- CONTRIBUTING.md: document the enforced layout and naming rules

All 38 existing providers (1909 files) pass the new checks unchanged.

Reported by Kevin Backhouse (GitHub Security Lab).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Harden registry CI pipeline against contributor-controlled names and symlinks
@jeffreyaven jeffreyaven self-assigned this Sep 30, 2026
@jeffreyaven
jeffreyaven merged commit dd439e7 into main Sep 30, 2026
17 checks passed
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.

1 participant