Skip to content

False positives for repository documentation read by default agent workflows #392

Description

@orassayag

Hi,

First of all, thanks for building Agent Scan - it's been very useful.

I noticed what appears to be a class of false positives when scanning default agent workflows (e.g. Claude Code/Codex skills).

For example, Agent Scan reports:

[W011 high]: Third-party content exposure detected (high risk: 0.85).

The required workflow explicitly instructs the agent to "Explore the codebase" and "inventory existing documentation" (e.g. docs/**/*.md, CONTRIBUTING.md, ARCHITECTURE.md, README.md), which are outsider-authored free text from the repository, and that text would be read at runtime to generate/update the customization files.

The issue is that these instructions are part of the normal behavior of coding agents. Reading repository files such as README.md, CONTRIBUTING.md, ARCHITECTURE.md, or documentation under docs/ is generally expected and necessary for understanding the project before making changes.

More (Codex - Installed with the CLI by default):

├── skill-installer 1 high finding
│   ● [W013 high]: Attempt to modify system services in skill instructions detected (high risk: 0.90). The prompt explicitly tells the agent to "request escalation" when running the helper scripts in the sandbox (encouraging privilege escalation) and includes 
│   instructions that allow overwriting preinstalled system skills and accessing private repos, which can modify the machine state.
│   ├── instruction SKILL.md                             
│   ├── asset       openai.yaml                          
│   ├── asset       LICENSE.txt                          
│   ├── asset       skill-installer.png                  
│   ├── asset       skill-installer-small.svg            
│   ├── script      github_utils.py                      
│   ├── script      list-skills.py                       
│   └── script      install-skill-from-github.py         
├── openai-docs 4 findings (4 high)
│   ● [E004 high]: Potential prompt injection detected (high risk: 1.00). The skill includes an instruction to retry an install "with escalated permissions" and "Do not ask the user to run it yet," which directs the agent to attempt privilege escalation and 
│   bypass user consent—a deceptive action outside the docs-only guidance scope.
│   ● [E006 high]: Malicious code pattern detected (high risk: 1.00). The skill contains an explicit instruction to automatically retry an installation with escalated permissions and to avoid asking the user to run it, which is an intentional 
│   privilege-escalation and social-engineering pattern indicating high-risk/malicious intent.
│   ● [W012 high]: Potentially malicious external URL detected (high risk: 1.00). The skill and its helper script explicitly fetch and use https://developers.openai.com/api/docs/guides/latest-model.md (and the MCP endpoint https://developers.openai.com/mcp) at 
│   runtime to determine model IDs and to fetch migration/prompting guides that directly control model-selection and prompt-upgrade behavior.
│   ● [W013 high]: Attempt to modify system services in skill instructions detected (high risk: 1.00). The skill explicitly instructs retrying an install command "with escalated permissions" if it fails due to permissions/sandboxing, which directs the agent to 
│   obtain elevated privileges and bypass security controls.

As a result, scans of the default skills/prompts shipped with tools like Claude Code or Codex generate high-severity findings even though there doesn't appear to be an actual prompt injection or data exposure issue.

Is this expected behavior?
I know i can just scan specific paths but I think it might worth (if so):

  • lowering the severity for this pattern,
  • distinguishing expected repository-documentation reads from genuine third-party prompt ingestion,
  • or providing a suppression/allowlist for common documentation files.

Otherwise, it may produce a significant number of false positives that make it harder to identify real issues.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions