Built-in Policies
MergeGuide includes a comprehensive library of security and code quality policies.Security Policies
no-hardcoded-secrets
Detects hardcoded secrets, API keys, passwords, and credentials.| Property | Value |
|---|---|
| ID | no-hardcoded-secrets |
| Severity | Error |
| Languages | All |
| Frameworks | NIST SSDF PW, OWASP ASVS V14, CIS 16.4 |
- API keys (AWS, Google, Stripe, etc.)
- Passwords and passphrases
- Private keys and certificates
- Database connection strings
- OAuth tokens
no-sql-injection
Detects potential SQL injection vulnerabilities.| Property | Value |
|---|---|
| ID | no-sql-injection |
| Severity | Error |
| Languages | JavaScript, TypeScript, Python, Java, PHP, Ruby |
| Frameworks | OWASP ASVS V5, CIS 16.4 |
- String concatenation in SQL queries
- Template literal interpolation in queries
- User input passed directly to queries
no-xss
Detects potential Cross-Site Scripting (XSS) vulnerabilities.| Property | Value |
|---|---|
| ID | no-xss |
| Severity | Error |
| Languages | JavaScript, TypeScript, PHP |
| Frameworks | OWASP ASVS V5 |
- innerHTML assignments with user data
- document.write with user input
- dangerouslySetInnerHTML in React
- Unescaped template output
no-eval
Detects dangerous dynamic code execution.| Property | Value |
|---|---|
| ID | no-eval |
| Severity | Error |
| Languages | JavaScript, TypeScript, Python |
| Frameworks | NIST SSDF PW, CIS 16.4 |
eval()function callsnew Function()constructorssetTimeout/setIntervalwith stringsexec()in Python
no-command-injection
Detects potential command injection vulnerabilities.| Property | Value |
|---|---|
| ID | no-command-injection |
| Severity | Error |
| Languages | JavaScript, Python, Ruby, PHP |
| Frameworks | OWASP ASVS V5 |
- Shell commands with user input
child_process.execwith variablesos.system()with user data
Code Quality Policies
no-console-in-production
Detects console statements that shouldn’t be in production.| Property | Value |
|---|---|
| ID | no-console-in-production |
| Severity | Warning |
| Languages | JavaScript, TypeScript |
console.log()console.debug()console.info()console.warn()(configurable)console.error()(configurable)
no-debugger
Detects debugger statements.| Property | Value |
|---|---|
| ID | no-debugger |
| Severity | Error |
| Languages | JavaScript, TypeScript, Python |
require-error-handling
Detects unhandled promise rejections and missing try-catch.| Property | Value |
|---|---|
| ID | require-error-handling |
| Severity | Warning |
| Languages | JavaScript, TypeScript |
- Promises without
.catch() - Async functions without try-catch
- Unhandled rejection patterns
no-todo-in-production
Detects TODO/FIXME comments.| Property | Value |
|---|---|
| ID | no-todo-in-production |
| Severity | Info |
| Languages | All |
Configuration Policies
no-debug-config
Detects debug configuration in production code.| Property | Value |
|---|---|
| ID | no-debug-config |
| Severity | Warning |
| Languages | All |
DEBUG=trueNODE_ENV=development- Debug flags in config files
require-https
Detects insecure HTTP URLs.| Property | Value |
|---|---|
| ID | require-https |
| Severity | Warning |
| Languages | All |
no-cors-wildcard
Detects overly permissive CORS configuration.| Property | Value |
|---|---|
| ID | no-cors-wildcard |
| Severity | Warning |
| Languages | JavaScript, TypeScript, Python |
Access-Control-Allow-Origin: *cors({ origin: '*' })
Enabling/Disabling Policies
Global Configuration
In.mergeguide.yaml:
Per-File Override
Per-Line Override
Policy Categories
View policies by category in the dashboard:| Category | Policies |
|---|---|
| Security | no-hardcoded-secrets, no-sql-injection, no-xss, no-eval, no-command-injection |
| Quality | no-console-in-production, no-debugger, require-error-handling, no-todo-in-production |
| Configuration | no-debug-config, require-https, no-cors-wildcard |
Framework Mapping
Policies map to compliance frameworks. MergeGuide supports 18 frameworks — the table below shows the primary built-in policies for each:| Framework | Relevant Built-in Policies |
|---|---|
| NIST SSDF | no-hardcoded-secrets, no-eval, no-sql-injection, no-command-injection |
| OWASP Top 10 | no-sql-injection, no-xss, no-command-injection, no-eval |
| OWASP ASVS L1/L2 | no-sql-injection, no-xss, no-command-injection, require-https, no-cors-wildcard |
| CWE Top 25 | no-sql-injection, no-xss, no-command-injection, no-hardcoded-secrets, no-eval |
| CIS Controls | no-hardcoded-secrets, no-eval, require-https, no-cors-wildcard |
| SOC 2 | no-hardcoded-secrets, require-https, no-debug-config |
| HIPAA | no-hardcoded-secrets, no-debug-config, require-https |
| PCI-DSS | no-hardcoded-secrets, no-sql-injection, require-https, no-eval |
| ISO 27001 | no-hardcoded-secrets, require-https, no-cors-wildcard |
| GDPR | no-hardcoded-secrets, no-debug-config |
| FedRAMP | no-hardcoded-secrets, require-https, no-debug-config |
| EU AI Act | no-hardcoded-secrets, no-eval |
| DORA | no-hardcoded-secrets, require-https, no-debug-config |
| NIS2 | no-hardcoded-secrets, require-https, no-eval |
| SLSA | no-hardcoded-secrets, no-eval |
| StateRAMP | no-hardcoded-secrets, require-https, no-debug-config |
| Colorado AI Act | no-hardcoded-secrets, no-eval |