Skip to content

Invalid settings syntax #3

@IanVS

Description

@IanVS

The syntax shown in the section about avoiding checkins of secrets does not seem to be correct:

https://github.com/Cranot/claude-code-guide?tab=readme-ov-file#best-security-practices-community

I do not see this kind of syntax in any documentation, and claude itself tells me that it's not correct.

You have:

{
  "permissions": {
    "deny": {
      "Write": ["*.env", "*.key", "*.pem", "*secret*"],
      "Edit": ["*.env", "*.key", "*.pem", "*secret*"]
    }
  }
}

But I believe it should instead be:

{
    "permissions": {
      "deny": [
        "Write(*.env)",
        "Write(*.key)",
        "Write(*.pem)",
        "Write(*secret*)",
        "Edit(*.env)",
        "Edit(*.key)",
        "Edit(*.pem)",
        "Edit(*secret*)"
      ]
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions