Skip to content

ci(decision-model-lint): Add API, audit, and security rules - #128453

Merged
michelletran-sentry merged 1 commit into
masterfrom
ci/decision-model-lint-rules
Oct 23, 2026
Merged

michelletran-sentry merged 1 commit into
masterfrom
ci/decision-model-lint-rules

Conversation

@michelletran-sentry

Copy link
Copy Markdown
Contributor

Add rules for request bodies read outside a serializer and serializer fields without a declared shape, an audit-trail rule for auth state changes, and security rules for secrets sent to telemetry, secret comparisons that are not constant time, and weakened endpoint permissions. All new rules warn and do not fail the check.

The auditlog rule currently has low precision (23%), but if it's only going to be on diffs, might be ok? I'm debating on whether we want to keep that.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 21, 2026
@michelletran-sentry
michelletran-sentry force-pushed the ci/decision-model-lint-rules branch from d68048d to 40db1a5 Compare October 22, 2026 00:48
@michelletran-sentry
michelletran-sentry marked this pull request as ready for review October 22, 2026 17:39
@michelletran-sentry
michelletran-sentry force-pushed the ci/decision-model-lint-rules branch from e75b31c to 4e30760 Compare October 22, 2026 17:57
Add warn-only rules to the decision-model lint config:

- api: request bodies read outside a serializer, and webhook payloads
  read without a serializer or schema.
- audit: token issuance and revocation, privilege grants, and account
  identity changes that are not recorded in an audit entry or security
  email.
- security: caller-supplied secrets compared with == or !=, writes to
  shared data reachable with only read access, credentials or whole
  incoming requests sent to telemetry, customer URLs fetched without the
  safe HTTP client, unvalidated redirects, values formatted into raw SQL,
  user content marked safe as HTML, and the random module used for
  secrets.

Each rule was tuned against labelled examples and whole-codebase runs.
Four security rules use a 0.8 threshold to cut borderline findings.

Co-Authored-By: Claude <noreply@anthropic.com>
@michelletran-sentry
michelletran-sentry force-pushed the ci/decision-model-lint-rules branch from 4e30760 to 234dd9c Compare October 22, 2026 19:02
@michelletran-sentry
michelletran-sentry merged commit f533d9f into master Oct 23, 2026
75 checks passed
@michelletran-sentry
michelletran-sentry deleted the ci/decision-model-lint-rules branch October 23, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants