Skip to content

Update: AI Agent Security Cheat Sheet #3003

Open

Description

@pushpakpuj

What is missing or needs to be updated?

Section 1 (Tool Security & Least Privilege) covers authorization middleware outside the agent's context, but not pre-execution hooks. That hook is where coding agents (Claude Code and similar CLI and IDE agents) expose this enforcement point for shell commands, file edits and pushes. The sheet doesn't cover the pitfalls specific to hooks: a hook that lets the action run when the hook itself fails, project-level hook config the agent can edit, and secret checks that look at filenames instead of contents.

How should this be resolved?

Add a short subsection at the end of Section 1, after Tool Authorization Middleware:

  • enforce at the pre-execution hook and parse the pending action;
  • judge secrets by content and follow data to network calls;
  • fail closed, and deploy hooks through managed settings the agent can't edit;
  • return the reason when an action is blocked, and start in log-only mode;
  • state the limits: a hook only sees what the agent sends through it.

Citations would be the Claude Code hooks and settings documentation and Anthropic's published permission-prompt data. I'll wait for discussion and approval before opening a PR.

This refiles #2961, which I filed through the API by mistake, so the template labels were missing. #3002 proposes a shorter Do and Don't version for the Secure Coding with AI Cheat Sheet. If you'd rather keep this guidance in one sheet, I'm happy to do that and link it from the other.

Disclosure: drafted with AI assistance (Claude); I checked every citation against its source.

Activity

  1. added
    ACK_WAITINGIssue waiting acknowledgement from core team before to start the work to fix it.
    UPDATE_CSIssue about the update/refactoring of a existing cheat sheet.
    HELP_WANTEDIssue for which help is wanted to do the job.
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ACK_WAITINGIssue waiting acknowledgement from core team before to start the work to fix it.HELP_WANTEDIssue for which help is wanted to do the job.UPDATE_CSIssue about the update/refactoring of a existing cheat sheet.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions