Skip to content

feat(compliance): add foundation docs and CLAUDE.md#98

Merged
williaby merged 4 commits into
mainfrom
claude/compliance-foundation-docs-1
May 15, 2026
Merged

feat(compliance): add foundation docs and CLAUDE.md#98
williaby merged 4 commits into
mainfrom
claude/compliance-foundation-docs-1

Conversation

@williaby
Copy link
Copy Markdown
Collaborator

Summary

  • Creates .claude/CLAUDE.md with Model Selection section, RAD cross-reference, and writing rules (CLAUDE-001 through CLAUDE-006)
  • Creates .claude/settings.json with explicit allow/deny permission blocks (CLAUDE-002)
  • Creates AGENTS.md with agent catalog and model assignment table (CLAUDE-003)
  • Creates GEMINI.md with repo context stub (CLAUDE-004)
  • Creates docs/known-vulnerabilities.md with empty baseline (FOUND-007)
  • Creates docs/architecture/ with ADR index and ADR-001 documenting the scorecard publish_results decision (FOUND-008)

Test plan

  • grep -c "Model Selection" .claude/CLAUDE.md returns 1
  • grep -c "response-aware-development" .claude/CLAUDE.md returns 1
  • python3 -c "import json; json.load(open('.claude/settings.json'))" exits 0
  • ls AGENTS.md GEMINI.md docs/known-vulnerabilities.md docs/architecture/adr-000-index.md all succeed

Generated with Claude Code

Copilot AI review requested due to automatic review settings May 15, 2026 00:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@williaby has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 38 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: efdeaf28-f93f-4713-8784-fea5bd71cfd7

📥 Commits

Reviewing files that changed from the base of the PR and between e5624cf and 3606ca2.

📒 Files selected for processing (9)
  • .claude/CLAUDE.md
  • .claude/settings.json
  • .gitignore
  • AGENTS.md
  • CHANGELOG.md
  • GEMINI.md
  • docs/architecture/adr-000-index.md
  • docs/architecture/adr-001-scorecard-publish-results.md
  • docs/known-vulnerabilities.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/compliance-foundation-docs-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds repository foundation documentation and AI-agent instruction files for compliance tracking, ADRs, and known vulnerability baseline management.

Changes:

  • Adds Claude, Gemini, and agent catalog instruction files.
  • Adds Claude Code permissions configuration.
  • Adds known-vulnerability baseline and ADR documentation for Scorecard publishing behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.claude/CLAUDE.md Adds Claude Code repository instructions, model selection, RAD guidance, and cross-references.
.claude/settings.json Adds Claude Code allow/deny permission settings.
AGENTS.md Adds specialized agent catalog and model assignment table.
GEMINI.md Adds Gemini CLI repository context and writing guidance.
docs/known-vulnerabilities.md Adds empty known-vulnerability tracking baseline.
docs/architecture/adr-000-index.md Adds ADR index.
docs/architecture/adr-001-scorecard-publish-results.md Documents Scorecard publish_results decision rationale.
Comments suppressed due to low confidence (3)

.claude/CLAUDE.md:30

  • This RAD cross-reference points to docs/response-aware-development.md, but that file is not present in the repository. Agents following this instruction will hit a broken link unless the referenced document is added or the link is corrected to an existing RAD document.
See: [docs/response-aware-development.md](https://github.com/ByronWilliamsCPA/.github/blob/main/docs/response-aware-development.md)

docs/architecture/adr-001-scorecard-publish-results.md:21

  • The accepted decision describes adding a direct self-scorecard job with publish_results: true, but the current .github/workflows/scorecard.yml still delegates to python-scorecard.yml and has no direct publishing job. An ADR should record the implemented decision or this PR should include the workflow change it documents.
Add a direct, non-reusable `self-scorecard` job to `scorecard.yml` in this repo
that uses `publish_results: true`. This job runs the scorecard action directly

docs/architecture/adr-001-scorecard-publish-results.md:29

  • This consequence is not true in the current repository: the existing .github/workflows/scorecard.yml calls the reusable workflow, whose scorecard step hard-codes publish_results: false, so the .github repo is not publishing results via a direct job.
- The `.github` repo itself publishes results via the direct job.

Comment thread .claude/CLAUDE.md
- Reusable GitHub Actions workflows (`.github/workflows/python-*.yml`)
- Org-level profile (`profile/README.md`)

There is no Python package, no test suite, and no build system in this repo.
Comment thread GEMINI.md
## Repository Context

This repo contains GitHub org-level community health files and reusable GitHub Actions
workflows. There is no Python package or test suite.
Comment on lines +9 to +28
When a reusable workflow calls `ossf/scorecard-action`, the OIDC token `repository`
claim resolves to the calling repo (e.g., `ByronWilliamsCPA/some-python-project`),
which is correct. However, Scorecard's API lookup uses this claim to attribute results.
When the reusable workflow itself is tested in the `.github` repo via `self-test.yml`,
the OIDC token resolves to `ByronWilliamsCPA/.github`, which does match the repo we
want to score. The constraint is `publish_results: true` in the reusable workflow would
expose results for every calling repo under a single API entry.

## Decision

Keep `publish_results: false` in `python-scorecard.yml` (the reusable workflow).
Add a direct, non-reusable `self-scorecard` job to `scorecard.yml` in this repo
that uses `publish_results: true`. This job runs the scorecard action directly
(not via the reusable), so the OIDC token `repository` claim correctly resolves to
`ByronWilliamsCPA/.github`.

## Consequences

- Downstream repos using `python-scorecard.yml` do not publish results (by design;
they opt in by adding their own scorecard workflow).
Comment thread GEMINI.md Outdated
Comment on lines +10 to +11
Gemini CLI tool names differ from Claude Code. See tool mapping in:
`~/.claude/skills/brainstorming/references/` for equivalents.
@williaby
Copy link
Copy Markdown
Collaborator Author

PR Review

3 Critical, 8 Important, 3 Suggested findings. Full report in conversation; summary below.


Critical (must fix before merge)

  • [CLAUDE.md policy] CHANGELOG.md: Not updated despite 3 feat/fix commits on branch. Global policy requires CHANGELOG update for all feat:, fix:, and perf: commits. Add an [Unreleased] entry covering the compliance foundation docs.

  • [Security] .claude/settings.json: Bash(gh:*) grants full gh CLI surface including gh secret set/delete (org secrets), gh auth token (token exfiltration), gh api -X DELETE (repo deletion), and gh workflow run. Especially severe in an org-level workflow templates repo. Replace with an explicit allowlist (gh pr *, gh repo view*, gh run view*) and add denies for gh secret*, gh api*, gh auth*.

  • [Security] .claude/settings.json: Deny list incomplete. Missing: git push (non-force), python3 -c* (bypasses gh denies via os.system), gh auth*. The rm -rf * deny pattern also has a space-before-wildcard gap that may not match rm -rf /path.


Important (should fix)

  • [Broken link] .claude/CLAUDE.md:31: RAD cross-reference targets docs/response-aware-development.md which does not exist (confirmed 404). Create a stub or replace with prose.

  • [Security] .claude/settings.json: Write(*) has no path restriction. Combined with Bash(gh:*), Claude Code can overwrite .github/workflows/ files and push them — direct supply chain vector in a workflow templates repo.

  • [Doc inconsistency] docs/architecture/adr-000-index.md:6 vs adr-001:3: Index lists ADR-001 as Accepted; ADR body says Proposed. Since implementation is deferred, Proposed in both is correct.

  • [Security] .gitignore: Only 3 .claude/ subdirs excluded. Missing: .claude/memories/, .claude/logs/, .claude/todos/, .claude/worktrees/, .claude/scheduled_tasks.lock (already exists on disk; may contain session state).

  • [Doc accuracy] adr-001:Context: ADR uses publish_results (underscore) throughout but the actual workflow input is publish-results (hyphen), confirmed in python-scorecard.yml.

  • [Broken reference] GEMINI.md:9: Tool Mapping references `~/.claude/skills/brainstorming/references/` which does not exist.

  • [PR description] .gitignore change not mentioned in PR Summary. It is the functional enabler for .claude/ files to be tracked by git — without it, settings.json and CLAUDE.md could not be committed.


SonarQube: 0 issues (all changed files excluded by sonar.exclusions patterns).
Copilot: Not requested — verify copilot_code_review rule in org ruleset.

🤖 Generated with Claude Code

williaby and others added 4 commits May 14, 2026 20:32
- Create .claude/CLAUDE.md with model selection, RAD cross-ref, writing rules (CLAUDE-001..006)
- Create .claude/settings.json with allow/deny permission blocks (CLAUDE-002)
- Create AGENTS.md with agent catalog and model assignment table (CLAUDE-003)
- Create GEMINI.md with repo context and tool mapping stub (CLAUDE-004)
- Create docs/known-vulnerabilities.md with empty baseline (FOUND-007)
- Create docs/architecture/ with ADR index and ADR-001 for scorecard decision (FOUND-008)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… files

Add negation entries for CLAUDE.md and settings.json so future .claude/
additions do not require git add -f. Ephemeral session state remains ignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…approach

Three fixes from code quality review:
- ADR-001 Context: OIDC claim resolves to callee (.github), not caller; match
  the authoritative comment in python-scorecard.yml
- ADR-001 Status: change Accepted to Proposed since the direct self-scorecard
  job is deferred to Task 5 (OSSF PR)
- .gitignore: replace broad .claude/ exclusion with specific transient
  subdirs (.claude/cache/, .claude/session/, .claude/conversations/); git
  cannot unignore files inside an excluded directory via negation patterns
- CLAUDE.md: add no-em-dash hook reference to Writing Rules section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… ADR accuracy

- settings.json: replace Bash(gh:*) blanket grant with scoped gh subcommands
  and expand deny list to block secret management, org ops, and destructive
  repo mutations; fixes security finding from PR #98 review
- .gitignore: add .claude/memories, logs, todos, worktrees, scheduled_tasks.lock
  to narrow transient exclusions; .claude/CLAUDE.md and settings.json remain tracked
- CHANGELOG.md: add missing [Unreleased] ### Added entries for CLAUDE.md,
  settings.json, AGENTS.md, GEMINI.md, known-vulnerabilities.md, and ADR docs
- GEMINI.md: replace dead ~/.claude/skills/brainstorming/references/ path with
  inline guidance; the referenced directory does not exist
- .claude/CLAUDE.md: replace 404 RAD link with reference to global CLAUDE.md
- docs/architecture/adr-000-index.md: fix status (Accepted -> Proposed), align
  table columns so pipes are consistent across header, separator, and data rows;
  update title to match ADR-001 heading
- docs/architecture/adr-001-scorecard-publish-results.md: fix title capitalisation,
  change present tense to future tense in Consequences for deferred self-scorecard job

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@williaby williaby force-pushed the claude/compliance-foundation-docs-1 branch from aaf3c3c to 3606ca2 Compare May 15, 2026 14:48
@williaby
Copy link
Copy Markdown
Collaborator Author

/pr-fix Summary

All findings from the /pr-review have been resolved. Branch was rebased onto main (1 commit ahead: fix(compliance): quick-wins remediation pass #97) before fixes were applied.

Fixes Applied

Critical

  • .claude/settings.json: replaced blanket Bash(gh:*) grant with scoped gh subcommands (gh pr *, gh issue view*, gh run view*, gh api repos/*/*) and expanded deny list to block secret management, org mutations, repo deletion/transfer, and destructive API calls — eliminates token exfiltration surface on org-level workflows

Important

  • CHANGELOG.md: added 7 missing [Unreleased] ### Added entries covering CLAUDE.md, settings.json, AGENTS.md, GEMINI.md, known-vulnerabilities.md, and ADR infrastructure
  • .gitignore: added .claude/memories, .claude/logs, .claude/todos, .claude/worktrees, .claude/scheduled_tasks.lock to transient exclusion list; session-sensitive content no longer tracked
  • docs/architecture/adr-000-index.md: corrected status (AcceptedProposed), updated title to match ADR-001 heading, fixed table pipe alignment (MD060)
  • docs/architecture/adr-001-scorecard-publish-results.md: fixed title capitalisation, changed present-tense "publishes" to future-tense "will publish" for the deferred self-scorecard job
  • GEMINI.md: replaced dead ~/.claude/skills/brainstorming/references/ path with inline guidance

Suggested

  • .claude/CLAUDE.md: replaced 404 link to docs/response-aware-development.md with reference to global ~/.claude/CLAUDE.md where RAD documentation lives

Commits Added

  • 10afb17 fix(gitignore): narrow .claude/ exclusion to allow intentional config files
  • 77b286f fix(docs): correct ADR-001 OIDC context, defer status, fix gitignore approach
  • 3606ca2 fix(compliance): harden settings, update CHANGELOG, fix dead refs and ADR accuracy

All changes passed pre-commit (trailing-whitespace, end-of-file-fixer, detect-private-key, TruffleHog).

@sonarqubecloud
Copy link
Copy Markdown

@williaby williaby merged commit 12924a8 into main May 15, 2026
21 checks passed
@williaby williaby deleted the claude/compliance-foundation-docs-1 branch May 15, 2026 20:56
williaby pushed a commit that referenced this pull request May 16, 2026
CLAUDE.md and GEMINI.md previously stated 'no test suite' in the Repository
Purpose / Repository Context sections. The repo does have a Bats test suite
under tests/ (covered by .github/workflows/shell-tests.yml), so the
statement was misleading agents about validation steps. Narrows the
statement to 'no Python package' and points to the Bats suite (PR #98
review).
williaby pushed a commit that referenced this pull request May 16, 2026
CLAUDE.md and GEMINI.md previously stated 'no test suite' in the Repository
Purpose / Repository Context sections. The repo does have a Bats test suite
under tests/ (covered by .github/workflows/shell-tests.yml), so the
statement was misleading agents about validation steps. Narrows the
statement to 'no Python package' and points to the Bats suite (PR #98
review).
williaby pushed a commit that referenced this pull request May 16, 2026
CLAUDE.md and GEMINI.md previously stated 'no test suite' in the Repository
Purpose / Repository Context sections. The repo does have a Bats test suite
under tests/ (covered by .github/workflows/shell-tests.yml), so the
statement was misleading agents about validation steps. Narrows the
statement to 'no Python package' and points to the Bats suite (PR #98
review).
williaby added a commit that referenced this pull request May 16, 2026
* fix(workflow-templates): correct fips-compatibility reusable path and cifuzzy SHA tag

- python-fips-compatibility.yml: add missing .github/ path segment so the
  starter template resolves the reusable workflow at the actual location
  (ByronWilliamsCPA/.github/.github/workflows/python-fips-compatibility.yml);
  the previous path pointed to a non-existent file at repo root and would
  fail to load (PR #70, #94 review).
- python-cifuzzy.yml: change the SHA comment for github/codeql-action/upload-sarif
  from '# v4' to '# v4.35.4' to match every other usage of the same SHA in
  this repo (PR #103 review).

* docs(workflows): add system-deps inputs to python-compatibility table

Adds system-deps-ubuntu, system-deps-macos, and system-deps-windows rows to
the inputs table so the caller-facing documentation matches the actual
workflow_call interface (PR #105 review).

* docs(community): route vulnerability reports to private channels

- profile/README.md: link to the GitHub Security Advisory creation form
  (/security/advisories/new) instead of the advisories list page, so
  reporters land directly on the private submission UI (PR #104 review).
- SUPPORT.md: split the Contact section into general inquiries (Issues
  or Discussions) and security vulnerabilities (private reporting via
  Security Advisories), so the broad 'all inquiries' wording no longer
  routes vulnerability reports to public channels (PR #104 review).

* docs(agents): clarify that the Bats test suite under tests/ exists

CLAUDE.md and GEMINI.md previously stated 'no test suite' in the Repository
Purpose / Repository Context sections. The repo does have a Bats test suite
under tests/ (covered by .github/workflows/shell-tests.yml), so the
statement was misleading agents about validation steps. Narrows the
statement to 'no Python package' and points to the Bats suite (PR #98
review).

* docs(changelog): record fips path and cifuzzy SHA tag fixes

Adds two entries under [Unreleased] Fixed to surface the
workflow-templates fixes already on this branch so downstream
consumers know to re-copy the starter templates after the
fips path correction.

* docs(agents): scope Bats coverage claim to update-pinned-actions.sh

The previous wording 'covers the shell scripts in scripts/' implied
broader validation than exists; only update-pinned-actions.bats runs,
covering one of the six shell scripts in scripts/. Names the specific
covered script and notes that the others are not yet tested.

* docs(workflows): fill default cells for system-deps inputs

The three system-deps-{ubuntu,macos,windows} rows had empty Default
cells, while every other row in the table specifies an explicit
backtick-quoted default. The workflow YAML has no default: key for
these inputs, so the actual default is the empty string; '' makes
the table uniform and removes ambiguity between 'no documented
default' and 'unset'.

* docs(workflows): add no-build input row to python-compatibility table

The docs table did not list the public no-build boolean input
(default true) added by PR #112; consumers had no way to discover
how to opt out of --no-build for projects with a build backend
like hatchling. Inserted in canonical YAML order after the
system-deps-windows row.

---------

Co-authored-by: Claude <noreply@anthropic.com>
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