review_script
Review ServiceNow scripts for security risks, performance anti-patterns, null safety, and best practices. Get a score, verdict, and per-issue fix guidance.
Instructions
Static analysis code review for a ServiceNow script.
Checks for:
Critical: eval(), hardcoded credentials, SQL/SOQL injection risk, unvalidated input
Anti-patterns: GlideRecord in loops, no setLimit, hardcoded sys_ids, gr.get in loops
Performance: full table scans, getRowCount, sync REST in BR, GlideAggregate opportunities
Null safety: missing gs.nil(), JSON.parse(null) risk, unchecked gr.get() return
Best practices: gs.print vs gs.info, no error handling on REST, bulk updates without setWorkflow
Returns a score (0-10), verdict, and per-issue fix guidance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The script source code to review | |
| type | No | server_script |