Skip to main content

Rule-based fix: the file is one AutoFix never changes

typehttps://docs.frem.sh/reference/api/errors/rule-fix-path-refused
HTTP status422 Unprocessable Content

What it means

Returned by POST /orgs/{org}/code-security/secrets/findings/{id}/fix and POST /orgs/{org}/code-security/iac/findings/{id}/fix (rule-based fixes). No fix was requested and no pull request was opened.

The finding is in a test file, a CI workflow, a suppression file or a dependency file. AutoFix never changes those files.

Example detail message returned with this error:

  • The finding is in a test, CI, suppression or dependency file, which AutoFix never changes.

The response also carries "reason": "path_refused".

What to do

Fix the file by hand.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/rule-fix-path-refused",
  "title": "Unprocessable Content",
  "status": 422,
  "detail": "...",
  "reason": "path_refused"
}

Branch on type, not on title or detail - those are human-readable and may be reworded.