Skip to content

security: define release-path code owners - #498

Open
codeforester wants to merge 1 commit into
mainfrom
security/484-20261028-release-controls
Open

codeforester wants to merge 1 commit into
mainfrom
security/484-20261028-release-controls

Conversation

@codeforester

Copy link
Copy Markdown
Contributor

Summary

  • add CODEOWNERS coverage for release workflows, VERSION, packaging metadata, locks, and release validators
  • document the independent-review and emergency-recovery controls for production releases
  • prepare the repository for the matching protected-main and v* tag rulesets

Validation

  • UV_CACHE_DIR=/private/tmp/base-cli-uv-cache uv run --extra dev pytest -q tests/test_security_documentation.py tests/test_validate_docs.py
  • Ruff and git diff --check pass

After this merges, apply the repository ruleset changes from #484: one approval, code-owner review, last-push approval, and immutable v* tags.

Relates to #484.

Comment thread docs/releasing.md
the package workflow, `VERSION`, packaging metadata, release locks, and release
validators. Maintainers must review the complete diff, and the independent
reviewer must rerun the quality and release gates before a production tag is
created. The repository ruleset protects `v*` tags from deletion and force

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Doc accuracy (verified live, false assurance in an incident-response context): this asserts a repository ruleset already protects v* tags from deletion/force-update, but verified directly against the GitHub API (gh api repos/basefoundry/base-cli/rulesets): only two branch-target rulesets exist ("Base branch naming", "Base default branch protection") and there is no tag-target ruleset at all. The branch ruleset's pull_request rule also shows require_code_owner_review: false and required_approving_review_count: 0 — code-owner review isn't enforced yet either. This PR's own description confirms the gap: "After this merges, apply the repository ruleset changes from #484: ... and immutable v* tags." The incident-response paragraph right below this assumes these controls hold — a reader relying on this doc during an actual credential-compromise incident would believe tags are immutable and CODEOWNERS is enforced when neither is true yet.

Comment thread .github/CODEOWNERS
/scripts/validate_* @codeforester @rameshulugar
/scripts/verify_* @codeforester @rameshulugar
/scripts/generate_release_metadata.py @codeforester @rameshulugar
/scripts/release_metadata_helpers.py @codeforester @rameshulugar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Security gap: this file doesn't protect itself — no pattern matches /.github/CODEOWNERS. Once code-owner review is enabled via the planned ruleset change, a PR that only edits this file (e.g. removes an entry, adds a third owner) still won't require review from @codeforester/@rameshulugar, defeating the control this PR is meant to bootstrap.

Comment thread .github/CODEOWNERS
/VERSION @codeforester @rameshulugar
/pyproject.toml @codeforester @rameshulugar
/requirements/ @codeforester @rameshulugar
/scripts/validate_* @codeforester @rameshulugar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Scope too broad (verified via grep): /scripts/validate_* matches far more than "release validators." Confirmed: validate_consumers.py is invoked only from compatibility.yml, validate_docs.py only from docs.yml, and validate_coverage.py/validate_consumer_typing.py/validate_schemas.py/validate_contract_fixtures.py(.mjs) only from tests/full_validate.sh (ordinary PR quality gates). Once code-owner review is enforced, a routine PR touching e.g. validate_coverage.py or validate_docs.py gets blocked pending sign-off from exactly two named individuals, despite having nothing to do with packaging or releasing — contradicting this PR's and issue #484's stated "release-path" scope.

Comment thread .github/CODEOWNERS
/.github/workflows/package.yml @codeforester @rameshulugar
/.github/workflows/issue-branch-policy.yml @codeforester @rameshulugar
/VERSION @codeforester @rameshulugar
/pyproject.toml @codeforester @rameshulugar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Scope too broad: protecting the entire /pyproject.toml sweeps in unrelated dev-tooling config, not just release/packaging metadata — the file also contains [tool.pytest.ini_options], [tool.mypy], [tool.coverage.*], and [tool.ruff]/[tool.ruff.lint] sections. A contributor tweaking a lint rule or adding a pytest marker needs @codeforester/@rameshulugar approval under the same rule meant for release/packaging metadata, once enforcement is on.

Comment thread docs/releasing.md
status checks, and the policy, quality, runtime, and consumer checks listed in
the repository ruleset. Deletion and non-fast-forward updates are disabled.

Release-path changes are additionally covered by `.github/CODEOWNERS`, including

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Doc gap: this prose enumerating what CODEOWNERS covers omits .github/workflows/issue-branch-policy.yml, even though the CODEOWNERS file protects it. A future maintainer trusting this doc as the authoritative list might remove/edit that CODEOWNERS entry not realizing it's intentionally protected, or be confused why that unrelated-looking workflow requires maintainer sign-off.

This branch has not been deployed

No deployments
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