Skip to content

CCAR-P · Domain 7: Developer Productivity and Operational Enablement · 8% of the exam

Task 7.3: Accountability for AI-Generated Code

Reviewing how a team that adopts AI-assisted development reviews and owns its code, and finding the control that keeps a person accountable for every AI-written change.

Study it

  • Human ownership of AI-generated code

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the Anthropic documentation page that proves it.

Question 1 · choose 1

An engineering organization's accountability policy says every commit that Claude Code helps write must carry the company's AI-assistance trailer, so that reviewers know to give it a full human review before merge. Audits show the trailer missing from many commits; several developers keep personal CLAUDE.md and memory rules saying "never add co-author trailers". Which control preserves the trailer?

  1. ASet attribution.commit to the company trailer in the repository's committed .claude/settings.json
  2. BSet attribution.commit to the company trailer in managed settings, which personal rules don't override
  3. CRely on the default Co-Authored-By trailer, which Claude Code adds to every commit unless the settings remove it
  4. DSet attribution.sessionUrl to true so that every commit carries a link to the session that produced it
Show the answer and why
  • ASet attribution.commit to the company trailer in the repository's committed .claude/settings.json

    Incorrect

    Claude is told that a developer's own CLAUDE.md or memory rule about attribution takes precedence over that line.

  • BSet attribution.commit to the company trailer in managed settings, which personal rules don't override

    Correct

    Personal attribution instructions take precedence over the commit line unless the line is set in managed settings.

  • CRely on the default Co-Authored-By trailer, which Claude Code adds to every commit unless the settings remove it

    Incorrect

    A developer's CLAUDE.md or memory rule about attribution takes precedence over the default line too.

  • DSet attribution.sessionUrl to true so that every commit carries a link to the session that produced it

    Incorrect

    sessionUrl covers the session link for cloud and Remote Control sessions; it doesn't restore the trailer.

The attribution setting customizes the text Claude Code adds to commits and pull requests. Claude Code tells Claude that the developer's own instructions about attribution, such as a CLAUDE.md or memory rule, take precedence over these commit and pull request lines, unless the line is set in managed settings. To keep a required trailer, set attribution.commit in a managed source.

Question 2 · choose 1

Developers write most new code with Claude Code in local sessions, and human reviewers report that too many injection and unsafe-deserialization issues reach pull requests. The team wants Claude to catch these while it writes, before a pull request exists, without anyone having to remember a command. Which addition matches Anthropic's documentation?

  1. AA CLAUDE.md line asking Claude to write secure code, with human reviewers checking that it was followed at each pull request
  2. BThe security-guidance plugin, which checks Claude's changes for vulnerabilities as it works, so that Claude fixes them in the session
  3. CA nightly CI job that scans the default branch and opens an issue for each finding it reports
  4. DA required second human reviewer on every pull request that touches security-sensitive files
Show the answer and why
  • AA CLAUDE.md line asking Claude to write secure code, with human reviewers checking that it was followed at each pull request

    Incorrect

    CLAUDE.md is guidance, and checking at the pull request is the downstream review the team wants to lighten.

  • BThe security-guidance plugin, which checks Claude's changes for vulnerabilities as it works, so that Claude fixes them in the session

    Correct

    The plugin runs automatically and catches such issues before the code reaches a pull request.

  • CA nightly CI job that scans the default branch and opens an issue for each finding it reports

    Incorrect

    A nightly scan finds issues after the code has already reached the branch.

  • DA required second human reviewer on every pull request that touches security-sensitive files

    Incorrect

    That adds review downstream instead of reducing what reaches the pull request.

The security-guidance plugin checks Claude's code changes for common vulnerabilities, such as injection, unsafe deserialization and unsafe DOM APIs, while it works, so that Claude fixes what it finds in the same session. Once installed it runs automatically, with nothing to invoke. It is the in-session companion to Code Review, which runs on pull requests: the plugin reduces what reaches the pull request.

Practice domain 7 →Practice all domains →