chore: add Hacktron AI security review configuration - #42067
Conversation
Add project rules and scan configuration for Hacktron AI, which performs automated security code review on every pull request. - .hacktron/rules.md: Appsmith-specific security context covering authorization model, Git/filesystem safety, SSRF controls, XSS boundaries, CI supply chain, CSRF/sessions, mass assignment, and multi-tenant caching. Includes a public disclosure policy to prevent Hacktron from publishing PoC exploits or reproduction steps in public PR comments. - .hacktron/config.yaml: Scan exclusions for markdown-only changes and a maintainer-controlled escape-hatch label. Gates merge on critical severity findings during initial calibration (escalate to high after week 1).
WalkthroughAdded Hacktron scanning configuration and comprehensive Appsmith CE security review rules covering disclosure, authorization, execution, networking, browser, datasource, session, CI, tenancy, secrets, and noise reduction. ChangesHacktron security review
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.hacktron/config.yaml (1)
8-10: 🔒 Security & Privacy | 🔵 TrivialSecurity Misconfiguration (CWE-16)
Keep the escape-hatch label maintainer-only and auditable.
Applying
hacktron-excludeskips the PR scan, so repository permissions and audit procedures should prevent untrusted contributors from applying it. (docs.hacktron.ai)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.hacktron/config.yaml around lines 8 - 10, Restrict application of the hacktron-exclude label to trusted maintainers through repository permissions, and ensure its use is covered by the repository’s audit procedures. Preserve the existing exclude.labels configuration while enforcing that untrusted contributors cannot apply this scan-bypass label..hacktron/rules.md (1)
145-155: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winApply the private-address policy consistently across address families.
The rules explicitly report IPv6 ULA access but exempt RFC1918 access unless a strict-private policy is bypassed. Define that policy once and apply it consistently, or legitimate self-hosted internal connectors may be classified differently based only on IP family.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.hacktron/rules.md around lines 145 - 155, Update the network-access reporting rules around the private-address exception to define one operator-enabled strict-private-address policy covering both IPv4 RFC1918 and IPv6 ULA ranges. Apply that shared policy consistently when classifying HTTP and non-HTTP connectors, while continuing to report loopback, link-local, and metadata-service access independently.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.hacktron/rules.md:
- Around line 211-218: Revise the “Multi-tenant caches and asynchronous
processing” rule to permit retries that preserve the original authorization
context and propagate failures unchanged. Keep prohibitions on onErrorResume,
defaultIfEmpty, or fallback data that allow failed mutations to proceed, and
restrict the retry prohibition to cases that change authorization context or
bypass a failed mutation.
- Around line 187-190: Update the CSRF guidance in the state-changing GET/HEAD
request rule to require browser-managed credentials and absent or insufficient
CSRF protection before classifying a route as vulnerable. Preserve review
coverage for CSRF exemptions, cookie attributes, anonymous endpoints, permit-all
matchers, login/logout, OAuth state, and session rotation, while excluding
routes protected by non-cookie authentication or equivalent controls.
---
Nitpick comments:
In @.hacktron/config.yaml:
- Around line 8-10: Restrict application of the hacktron-exclude label to
trusted maintainers through repository permissions, and ensure its use is
covered by the repository’s audit procedures. Preserve the existing
exclude.labels configuration while enforcing that untrusted contributors cannot
apply this scan-bypass label.
In @.hacktron/rules.md:
- Around line 145-155: Update the network-access reporting rules around the
private-address exception to define one operator-enabled strict-private-address
policy covering both IPv4 RFC1918 and IPv6 ULA ranges. Apply that shared policy
consistently when classifying HTTP and non-HTTP connectors, while continuing to
report loopback, link-local, and metadata-service access independently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0208d296-6d85-4923-aca1-d12fd6e6b6e0
📒 Files selected for processing (2)
.hacktron/config.yaml.hacktron/rules.md
- CSRF: require browser-managed credentials + missing protection, not just state-changing GET alone - Retries: allow retries preserving auth context; only flag those that swallow failures or change authorization context
Summary
Adds Hacktron AI configuration to enable automated security code review on every PR with Appsmith-specific context.
Files added
.hacktron/rules.md— Project rules giving Hacktron deep understanding of Appsmith's security model:.hacktron/config.yaml— Scan configuration:hacktron-excludelabel as maintainer escape hatchcriticalseverity during calibration week, then escalate tohighWhy this matters
Hacktron learns from project rules and triage feedback. Without rules, it doesn't know that:
This will significantly reduce false positives while ensuring real vulnerabilities (BOLA, path traversal, command injection, SSRF bypasses) are caught.
Public disclosure safeguard
Since this is a public repository,
rules.mdincludes an explicit disclosure policy instructing Hacktron to never publish exploitation details, PoC payloads, or step-by-step reproduction in public PR comments. Full details remain in the private Hacktron dashboard.Next steps after merge
fail_on.severityfromcriticaltohigh.hacktron/**to CODEOWNERSWarning
Tests have not run on the HEAD 7f4be3a yet
Wed, 29 Jul 2026 18:56:56 UTC
Fixes https://linear.app/appsmith/issue/APP-15738/integrate-hacktron-ai-security-review-and-optimize-configuration
Summary by CodeRabbit