Skip to content

chore: add the missing repository hygiene files and checks - #109

Open
pajoma wants to merge 5 commits into
developfrom
chore/repo-hygiene
Open

pajoma wants to merge 5 commits into
developfrom
chore/repo-hygiene

Conversation

@pajoma

@pajoma pajoma commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

The review of #108 listed the repository hygiene gaps of this public repository (section G of the review report). This PR closes the ones that can be fixed in files; the rest are repository settings (below).

What

  • LICENSE: the MIT text for the license the README declares (copyright holder: Blueprint Team, as in pyproject.toml). Before, the README's license link led nowhere.

  • pyproject.toml: license = "MIT" and license-files = ["LICENSE"]. feat: multi-agent grouping (0.9.0) #96 had removed the MIT classifier and these fields while the licence was undecided; this PR is that decision. The wheel now carries License-Expression: MIT and dist-info/licenses/LICENSE, and the sdist ships LICENSE.

  • .github/CODEOWNERS: @bechtleav360/data-practice owns the whole repository. The team has write access, so the file is valid. Its review becomes mandatory only once a ruleset requires code-owner review.

  • SECURITY.md: report vulnerabilities as an issue (title starts with Security:), without exploit details, secrets or data from your own systems. Fixes are released as new versions; no backports.

  • CONTRIBUTE.md → CONTRIBUTING.md: the standard name, so GitHub links it from the issue and PR forms. Content unchanged.

  • README.md: the CI badge pointed at another repository. The links to LICENSE, CONTRIBUTING.md and SECURITY.md are now absolute because the README is also the PyPI description. The badge lines are identical to those in feat: multi-agent grouping (0.9.0) #96.

  • .github/dependabot.yml: weekly update PRs for pip (pyproject.toml) and GitHub Actions (workflows and the composite action). Minor and patch updates are grouped; commit prefixes follow the conventional-commit style.

  • .github/workflows/security.yml (new job "Security Scan"):

    • bandit with the same settings as the pre-commit hook
    • pip-audit on the resolved dependencies

    It runs on every push and pull request, and weekly on the default branch, because new advisories appear without code changes. Both tools are pinned and run through uvx, so pyproject.toml and the venv cache are unchanged. This is a separate file to avoid conflicts with chore(claude): review every AI commit for project names #108, which also extends ci.yml.

  • .github/workflows/publish.yml: a CycloneDX SBOM per release. The SBOM is generated from the wheel installed into a clean venv, which gives the dependency versions it resolves to at release time. It is uploaded as an artifact and attached to the GitHub release. It stays out of dist/, which goes to PyPI unchanged.

Update after #96 was merged

Merging develop into this branch brought in #96, and with it three changes on this branch:

  • ea22361: the merge. The only conflict was the contributing link in README.md, resolved to CONTRIBUTING.md; nothing else in the tree still names CONTRIBUTE.md.
  • 893d762 (build:): the licence metadata in pyproject.toml above, with a CHANGELOG.md entry under [Unreleased] -> Added.
  • e8b0bc0 (fix:): the Security Scan of this PR failed on the merged tree, because bandit found five Low issues in code that came with feat: multi-agent grouping (0.9.0) #96. Fixed in the code, without nosec comments or new skips:
    • B105 x4: both NATS wildcard matchers (subject_is_covered_by() in clients/io/io_client_base.py, NATSClient._subject_matches()) named their loop variable token, which bandit reads as a password whenever it is compared with '>' or '*'. Renamed to segment; no behaviour change.
    • B101 x1: Config.resolved_settings() checked a view's loader with an assert, which python -O strips. It now raises RuntimeError, covered by a new unit test in tests/unit/agents/config/test_namespace_views.py.

These fixes are the only package code changes in this PR. There is no version bump; the version comes from the release tag.

Verified locally

  • bandit 1.9.4 on src/ with the workflow's settings, on the merged tree in a python:3.13-slim container: 5 Low before e8b0bc0, none after (exit 0).
  • pip-audit 2.10.1 on the resolved dependencies of .[ci] (150 packages, resolved fresh in the same container): no known vulnerabilities.
  • SBOM step replayed on a locally built 0.8.2 wheel with cyclonedx-bom 7.5.0: valid CycloneDX 1.6 JSON. It has 132 components, 130 of them with licence data.
  • Build with setuptools 84 on the merged tree: License-Expression: MIT and License-File: LICENSE in the wheel metadata, LICENSE in the wheel and the sdist.
  • Unit suite on the merged tree: 3972 passed, 1 skipped, 0 failed. ruff check, ruff format --check and mypy src/ clean.
  • yamllint (relaxed) and actionlint: no findings in the new or changed steps. actionlint's findings in publish.yml are older shellcheck notes on existing steps.

In CI on e8b0bc0 all checks are green. One unit test failed once in the push run and passed on re-run and in the pull_request run: a timing-dependent test from #96, unrelated to this PR, tracked in #114.

Not verified: the publish workflow end to end, which only runs on a release tag. The first release after this merge will show whether the SBOM is attached.

Repository settings

  • Done (admin, outside this PR): GitHub secret scanning and push protection are now enabled for the repository.
  • Still open, for an admin:
    • Re-enable the three rulesets for main and develop. They are currently not enforced, so no review and no check is required to merge.
    • Then add "Security Scan" and "No replaced history" (from chore(claude): review every AI commit for project names #108) as required status checks.
    • Optionally require a review from code owners.

Review notes

  • Generated with an AI assistant, including the update after feat: multi-agent grouping (0.9.0) #96. The workflow changes, especially the publish workflow, need a human review.
  • The licence choice (MIT) was confirmed by the repository owners on 2026-10-23: this PR is the decision feat: multi-agent grouping (0.9.0) #96 deferred. The copyright line (Blueprint Team) still needs confirming.
  • New tools run only in CI and are not distributed: bandit, pip-audit and cyclonedx-bom (all Apache-2.0). No GPL/AGPL.

🤖 Generated with Claude Code

pajoma and others added 2 commits October 22, 2026 12:05
- LICENSE: MIT text for the license README and pyproject.toml already declare;
  setuptools now ships it in the wheel and the sdist
- .github/CODEOWNERS: the data-practice team owns the whole repository
- SECURITY.md: how to report a vulnerability (as an issue, without exploit
  details or secrets)
- CONTRIBUTE.md -> CONTRIBUTING.md, so GitHub links it; README updated
- README: the CI badge pointed at another repository
- .github/dependabot.yml: weekly updates for pip and GitHub Actions
- Security workflow: bandit (pre-commit settings) and pip-audit on every push
  and pull request, plus a weekly run on the default branch
- Publish workflow: CycloneDX SBOM of each release, attached to the GitHub
  release (kept out of dist/, which goes to PyPI)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README is also the package description on PyPI, where relative links
break. Same form as the badge links in #96, so the two PRs merge cleanly there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

SawwR commented Oct 22, 2026

Copy link
Copy Markdown

⚠️ Version not bumped

pyproject.toml has version = "0.8.2" on both this branch (chore/repo-hygiene) and the target branch (develop). The PR version must be greater than the target version under semver.

Please bump the version in pyproject.toml (e.g. to 0.8.3) before merging.


Generated by Claude Code

Astrasu and others added 3 commits October 23, 2026 14:21
The only conflict was the contributing link in README.md: develop still named
CONTRIBUTE.md, this branch renames it to CONTRIBUTING.md. Kept CONTRIBUTING.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
LICENSE alone leaves the published package without a licence: the metadata
needs license = "MIT" (PEP 639 expression) and license-files. With them the
wheel carries License-Expression: MIT and dist-info/licenses/LICENSE, and the
sdist ships LICENSE. Both were removed from the feature branch while the
licence was undecided; this PR is that decision.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Security Scan job of this PR fails once develop is merged in: bandit
reports five Low findings in code that came with #96.

- B105 (hardcoded password) x4: both NATS wildcard matchers,
  subject_is_covered_by() and NATSClient._subject_matches(), named their loop
  variable `token`, and bandit reads any comparison of a `token` with a string
  literal ('>', '*') as a password. Renamed to `segment`; no behaviour change.
- B101 (assert) x1: Config.resolved_settings() checked a view's loader with an
  assert, which `python -O` strips, leaving an AttributeError later. It now
  raises RuntimeError, covered by a new unit test.

No nosec comments and no skipped tests: bandit runs clean with the workflow's
own settings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@Astrasu Astrasu 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.

Review prepared with Claude Code. This is a comment, not an approval; a human reviewer decides.

Reviewed at e8b0bc0 against develop. No blocking issues in the files. The publish workflow is consistent: steps.release.outputs.version exists, the SBOM goes only to the GitHub release, and dist/ still goes to PyPI unchanged. The three commits from the update after #96 (merge, licence metadata, bandit fixes) are not reviewed here, since they were written in the same session as this review; their evidence is in the description.

Should change before merge

  1. Dependabot would raise every lower bound in pyproject.toml weekly. .github/dependabot.yml sets no versioning-strategy for pip. Community reports say the default (auto) raises each >= floor to the latest release for pip. For a library that forces every consumer onto the newest versions, although the old ones still work. The usual fix is versioning-strategy: increase-if-necessary, which only touches a range when a new release falls outside it (widen is rejected for pip). This rests on community reports, not on GitHub's docs, and was not tested here.
  2. SECURITY.md sends vulnerability reports to public issues. The guidance limits what goes in, but the repository is public: a report still discloses that a vulnerability exists, where, in which version and with what impact, before a fix is out. Suggest enabling Private vulnerability reporting in the repository settings (admin) and pointing SECURITY.md to Security -> Report a vulnerability.

Decisions for the owners

  1. Copyright holder. LICENSE names "Blueprint Team", which is not a legal person. An earlier draft on the #96 branch named the company. The MIT decision does not settle this line by itself; someone responsible should confirm who the holder is.
  2. Team name in CODEOWNERS. CODEOWNERS names the team bechtleav360/data-practice. CLAUDE.md asks for explicit approval before team names go into this public repository. The file cannot work without a real name, so this is a yes/no, not a request for a generic substitute.

Nits

  1. security.yml has no permissions: block, so the job runs with the token's default permissions. permissions: contents: read is all it needs (ci.yml has the same gap).
  2. The SBOM is generated from a venv that contains its own pip, so pip appears as a component although it is not a dependency of the package. python -m venv --without-pip plus pip --python "$RUNNER_TEMP/sbom-env/bin/python" install dist/*.whl would leave it out.
  3. Security Scan and CI run twice for every push to a PR branch (push and pull_request on all branches). Limiting push to develop/main would halve the runs. Better as a separate change covering both workflows.

Points 1, 5 and 6 can be fixed on this branch if the author agrees.

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.

3 participants