Skip to content

feat(grc-auditor): add risk-report command taught in CGE-AUD Ch 5.4 - #224

Open
ajy0127 wants to merge 1 commit into
mainfrom
feat/grc-auditor-risk-report
Open

feat(grc-auditor): add risk-report command taught in CGE-AUD Ch 5.4#224
ajy0127 wants to merge 1 commit into
mainfrom
feat/grc-auditor-risk-report

Conversation

@ajy0127

@ajy0127 ajy0127 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Why

CGE-AUD Chapter 5.4 (Drafting a Risk Report) teaches /grc-auditor:risk-report — the lesson video walks through it and two exam questions reference it — but the plugin shipped without the command. Members following the lesson hit an unknown command (surfaced by a member in the study group Slack today).

What

  • Adds plugins/grc-auditor/commands/risk-report.md implementing the workflow as taught: read every evidence file as-is, cross-reference between files, cluster findings into risks, rate likelihood × impact from the evidence only, draft a ranked report in the audience's language with a per-risk citation to the exact evidence file, and append a run_id traceability block.
  • Accepts positional (<path> <audience>) and flag-style (--input=, --audience=) arguments, matching both forms shown in the course.
  • Points the examples/sample-evidence/ README (the Ch 5.4 practice pack) at the new command, keeping review-evidence as the noted alternative.
  • CHANGELOG entry under Unreleased.

Verification

  • npm run test:plugin-manifests — 67 manifests valid
  • npm run test:unit — 55/55 pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added the grc-auditor:risk-report command for creating ranked risk reports from evidence folders.
    • Reports include supporting evidence citations, risk ratings, audience-specific language, and run traceability.
    • Supports both positional and flag-based arguments.
  • Documentation

    • Added command guidance covering evidence review, cross-referencing, risk clustering, reporting requirements, and draft review.
    • Updated sample evidence instructions with a leadership-focused example and an alternative control-by-control review.

The CGE-AUD course (Ch 5.4, Drafting a Risk Report) and its exam
questions reference /grc-auditor:risk-report, but the plugin shipped
without it — members following the lesson hit an unknown command.

Adds the command as taught: read a folder of raw evidence as-is,
cluster findings into risks, rate likelihood x impact from the
evidence, and draft a ranked report in the audience's language with
a per-risk citation to the exact evidence file and a run_id
traceability block. Accepts positional and --input=/--audience=
flag forms, matching both shapes shown in the course.

Points the examples/sample-evidence README (the Ch 5.4 practice
pack) at the new command, keeping review-evidence as the noted
alternative.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ajy0127
ajy0127 requested a review from a team as a code owner August 11, 2026 17:57
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR documents the grc-auditor:risk-report command, updates the sample evidence workflow, and adds the command to the unreleased changelog.

Changes

Risk report command

Layer / File(s) Summary
Risk report command workflow
plugins/grc-auditor/commands/risk-report.md, examples/sample-evidence/README.md, CHANGELOG.md
Defines evidence inputs, audience options, risk ranking, citations, traceability, review responsibilities, and example invocations. Updates the sample workflow and changelog entry.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: abdie-grcengineer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the new risk-report command and its grc-auditor scope, which matches the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/grc-auditor-risk-report

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.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds the missing prompt-only /grc-auditor:risk-report workflow and updates the Chapter 5.4 practice documentation and changelog.

  • Reads and cross-references raw evidence, clusters findings into ranked risks, and tailors the report to its audience.
  • Requires evidence citations and a run traceability block.
  • Documents positional and flag-style invocation examples.

Confidence Score: 4/5

The PR appears safe to merge, with two non-blocking improvements recommended for deterministic argument handling and trustworthy traceability metadata.

The new prompt-only command provides the intended reporting workflow, but its flag mapping is descriptive rather than explicit and its required plugin version lacks an authoritative lookup instruction.

Files Needing Attention: plugins/grc-auditor/commands/risk-report.md

Important Files Changed

Filename Overview
plugins/grc-auditor/commands/risk-report.md Adds the complete report-drafting workflow; argument binding and version provenance would benefit from explicit instructions.
examples/sample-evidence/README.md Updates the Chapter 5.4 exercise to invoke the new command while retaining review-evidence as an alternative.
CHANGELOG.md Documents the new command, supported invocation forms, and intended workflow.

Fix All in Claude Code Fix All in Codex Fix All in Cursor

Reviews (1): Last reviewed commit: "feat(grc-auditor): add risk-report comma..." | Re-trigger Greptile

- `$1` - Evidence folder or file path (required)
- `$2` - Audience (optional: `leadership`, `ciso`, `audit-committee`, `engagement-manager`; defaults to `leadership`)

Flag-style arguments are also accepted: `--input=<path>` and `--audience=<audience>` map to `$1` and `$2`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Flag mapping remains implicit

The documented --input and --audience mapping exists only as descriptive text; the workflow never consumes these flags, $1/$2, or $ARGUMENTS. This leaves flag-style argument handling dependent on model inference rather than an explicit binding, making the advertised form less reliable and harder to validate.

Knowledge Base Used: Persona Plugins: Auditor, Internal GRC, TPRM, Reporter

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex Fix in Cursor

6. Do not invent findings. If a configuration in the evidence is fine, do not flag it. If the evidence does not support a risk, leave it out — an empty section is better than an unsupported claim.

7. Append a traceability block: a `run_id` (date-based, e.g. `2026-08-11-r1`), the plugin name and version, the draft date, and an inventory of the evidence files read. Anyone questioning a risk should be able to walk from the risk statement to the evidence file to the original system.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Version provenance is unspecified

The traceability block requires the plugin version, but the command never directs Claude to obtain it from the authoritative plugin manifest. Generated reports can therefore omit or infer this value, reducing traceability and allowing the recorded version to become stale after a release.

Knowledge Base Used: Persona Plugins: Auditor, Internal GRC, TPRM, Reporter

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex Fix in Cursor

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
plugins/grc-auditor/commands/risk-report.md (1)

24-30: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Define the rating scale and ranking rule.

The command requires likelihood × impact ratings but defines no allowed values, matrix, insufficient-evidence behavior, or tie-break rule. Add these rules so identical evidence produces consistent ratings and rankings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/grc-auditor/commands/risk-report.md` around lines 24 - 30, Update the
risk-report guidance around the likelihood × impact rating requirements to
define allowed likelihood and impact values, how to handle insufficient
evidence, and how to calculate and rank combined scores. Add a deterministic
tie-break rule so risks with equal scores are ordered consistently, while
preserving the existing evidence-based rating and citation requirements.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/grc-auditor/commands/risk-report.md`:
- Line 34: Update the traceability block instructions to source the plugin name
and version from the installed plugin manifest, generate a unique per-run suffix
rather than always using `r1`, and emit `unknown` whenever required manifest
metadata is unavailable instead of inferring values.
- Around line 18-20: Update the evidence-handling instructions in the
risk-report guidance to explicitly treat all evidence contents as untrusted data
only: ignore embedded instructions, do not execute commands or follow links, and
do not copy secrets into the report, while preserving the existing requirements
to read files as-is and cross-reference artifacts.
- Around line 11-18: Update Step 1 of the risk-report instructions to
distinguish input types: read the single regular file provided as $1 directly,
enumerate and read every regular file when $1 is a directory, and reject
unsupported paths with a clear error. Preserve the existing requirement to
process evidence as-is.

---

Nitpick comments:
In `@plugins/grc-auditor/commands/risk-report.md`:
- Around line 24-30: Update the risk-report guidance around the likelihood ×
impact rating requirements to define allowed likelihood and impact values, how
to handle insufficient evidence, and how to calculate and rank combined scores.
Add a deterministic tie-break rule so risks with equal scores are ordered
consistently, while preserving the existing evidence-based rating and citation
requirements.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c97ba13f-0ef5-4a09-8ff5-acb2d14174ba

📥 Commits

Reviewing files that changed from the base of the PR and between f2ffeff and a8276f4.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • examples/sample-evidence/README.md
  • plugins/grc-auditor/commands/risk-report.md

Comment on lines +11 to +18
- `$1` - Evidence folder or file path (required)
- `$2` - Audience (optional: `leadership`, `ciso`, `audit-committee`, `engagement-manager`; defaults to `leadership`)

Flag-style arguments are also accepted: `--input=<path>` and `--audience=<audience>` map to `$1` and `$2`.

## Instructions

1. Read every file in the evidence folder as-is. Evidence arrives raw (JSON, CSV, Terraform, logs) exactly as the tools produced it — do not ask for reformatting. The point is that every claim in the report traces back to an original evidence file.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Handle regular-file input explicitly.

$1 accepts a file or directory, but Step 1 only defines folder processing. If the user passes a file, the command does not state which artifact to read or how to inventory it. Read one regular file directly, enumerate regular files for a directory, and reject unsupported paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/grc-auditor/commands/risk-report.md` around lines 11 - 18, Update
Step 1 of the risk-report instructions to distinguish input types: read the
single regular file provided as $1 directly, enumerate and read every regular
file when $1 is a directory, and reject unsupported paths with a clear error.
Preserve the existing requirement to process evidence as-is.

Comment on lines +18 to +20
1. Read every file in the evidence folder as-is. Evidence arrives raw (JSON, CSV, Terraform, logs) exactly as the tools produced it — do not ask for reformatting. The point is that every claim in the report traces back to an original evidence file.

2. Cross-reference between files. Resource IDs, account IDs, and usernames that appear in one artifact often reappear in others; a risk supported by multiple artifacts is stronger than one supported by a single line.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Treat evidence contents as untrusted data.

Raw logs, CSV cells, or Terraform comments can contain prompt-injection instructions. The command does not tell the model to ignore instructions inside evidence. State that evidence is data only, that commands and links must not be executed or followed, and that secrets must not be copied into the report.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/grc-auditor/commands/risk-report.md` around lines 18 - 20, Update the
evidence-handling instructions in the risk-report guidance to explicitly treat
all evidence contents as untrusted data only: ignore embedded instructions, do
not execute commands or follow links, and do not copy secrets into the report,
while preserving the existing requirements to read files as-is and
cross-reference artifacts.


6. Do not invent findings. If a configuration in the evidence is fine, do not flag it. If the evidence does not support a risk, leave it out — an empty section is better than an unsupported claim.

7. Append a traceability block: a `run_id` (date-based, e.g. `2026-08-11-r1`), the plugin name and version, the draft date, and an inventory of the evidence files read. Anyone questioning a risk should be able to walk from the risk statement to the evidence file to the original system.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use authoritative traceability values.

The command requires a plugin version and a date-based run_id, but it does not define the source for the version or how r1 becomes unique. Read the name and version from the installed plugin manifest, generate a unique per-run suffix, and emit unknown instead of guessing when metadata is unavailable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/grc-auditor/commands/risk-report.md` at line 34, Update the
traceability block instructions to source the plugin name and version from the
installed plugin manifest, generate a unique per-run suffix rather than always
using `r1`, and emit `unknown` whenever required manifest metadata is
unavailable instead of inferring values.

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