en un clic
codeql-scanning
// Analyze code for common vulnerability patterns using CodeQL-style queries. Identify injection flaws, unsafe deserialization, prototype pollution, path traversal, and other security issues in TypeScript/JavaScript code.
// Analyze code for common vulnerability patterns using CodeQL-style queries. Identify injection flaws, unsafe deserialization, prototype pollution, path traversal, and other security issues in TypeScript/JavaScript code.
Triage Cacti CI failures on a PR or main branch, fetch failing job logs via gh CLI, categorize root causes, and produce a structured markdown report at docs/ci-reports/. Use when the user asks why CI is failing, asks for a CI failure report, references a failing PR or run, mentions GitHub Actions failures, or asks to analyze/diagnose pipeline issues in the Hyperledger Cacti monorepo.
Cross-verify assertions, assumptions, and logic in code or explanations. Use as a quality gate before committing changes. Re-reads relevant code and confirms correctness.
Generate a structured refactoring plan for a Cacti package or module. Analyzes current code structure, identifies improvement opportunities, and produces a phased plan with risk assessment.
<One sentence describing what knowledge this skill provides.>
| name | codeql-scanning |
| description | Analyze code for common vulnerability patterns using CodeQL-style queries. Identify injection flaws, unsafe deserialization, prototype pollution, path traversal, and other security issues in TypeScript/JavaScript code. |
Identify security vulnerability patterns in TypeScript/JavaScript code using static analysis techniques inspired by CodeQL queries.
SQL Injection: User input concatenated into SQL queries.
// BAD: string concatenation
const query = `SELECT * FROM users WHERE id = '${userId}'`;
// GOOD: parameterized query
const query = `SELECT * FROM users WHERE id = $1`;
Command Injection: User input passed to shell commands.
// BAD: unsanitized input in exec
exec(`git clone ${repoUrl}`);
// GOOD: use execFile with argument array
execFile("git", ["clone", repoUrl]);
XSS: User input rendered without escaping in HTML responses.
Object.assign or spread with untrusted objects__proto__ or constructor.prototype in user inputJSON.parse of untrusted input without schema validationeval or Function() with dynamic input../ sequencesMath.random() for security-sensitive valuesopenapi.json missing security
scheme definitions.cactus-test-tooling imported in main source.For each finding, trace the data flow:
## CodeQL-Style Scan: [Package/Scope]
### Findings
#### [CWE-XXX] [Vulnerability Name]
- **Severity**: Critical/High/Medium/Low
- **Source**: [file:line] — [description of data entry point]
- **Sink**: [file:line] — [description of dangerous operation]
- **Flow**: source → [intermediate steps] → sink
- **Sanitizer**: [present/missing]
- **Fix**: [specific remediation steps]
### Summary
- Critical: [count]
- High: [count]
- Medium: [count]
- Low: [count]