codeql-semgrep — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited codeql-semgrep (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Part of Agent Skills™ by googleadsagent.ai™
CodeQL & Semgrep integrates production-grade static analysis into agent workflows for deep vulnerability detection, custom rule authoring, and automated code review enforcement. The agent writes CodeQL queries and Semgrep rules tailored to project-specific patterns, runs them against codebases, and interprets results with actionable remediation guidance.
Pattern-matching security scanners catch surface-level issues. CodeQL and Semgrep operate at a deeper level: CodeQL builds a relational database of the program's structure and evaluates queries that trace data flow from sources (user input) to sinks (dangerous operations). Semgrep matches syntactic patterns with type-aware analysis. Together, they catch vulnerabilities that regex-based scanners miss entirely.
This skill goes beyond running default rulesets. The agent writes custom rules for project-specific patterns: ensuring all database queries use the project's ORM wrapper, verifying that authentication middleware is applied to every route, or confirming that error responses never leak stack traces. Custom rules encode institutional security knowledge that persists beyond any individual reviewer.
graph TD
A[Codebase] --> B{Analysis Engine}
B -->|Data Flow| C[CodeQL: Build Database]
B -->|Pattern Match| D[Semgrep: Parse AST]
C --> E[Run CodeQL Queries]
D --> F[Run Semgrep Rules]
E --> G[Taint Tracking: Source → Sink]
F --> H[Pattern Matches + Metavariables]
G --> I[Merge Findings]
H --> I
I --> J[Deduplicate + Prioritize]
J --> K[Remediation Report]
K --> L[CI/CD Gate: Pass/Fail]CodeQL excels at data flow analysis (tracing tainted input through the program); Semgrep excels at pattern matching (finding structural anti-patterns). Running both provides comprehensive coverage.
# .semgrep/agent-rules.yml
rules:
- id: sql-injection-f-string
patterns:
- pattern: |
$CURSOR.execute(f"...", ...)
message: >
SQL query uses f-string interpolation, which is vulnerable to SQL injection.
Use parameterized queries instead.
severity: ERROR
languages: [python]
metadata:
cwe: ["CWE-89"]
confidence: HIGH
- id: missing-auth-middleware
patterns:
- pattern: |
@app.route($PATH, ...)
def $FUNC(...):
...
- pattern-not-inside: |
@require_auth
@app.route($PATH, ...)
def $FUNC(...):
...
message: >
Route handler $FUNC lacks @require_auth decorator.
All routes must be authenticated unless explicitly exempted.
severity: WARNING
languages: [python]
metadata:
cwe: ["CWE-306"]
- id: no-eval-user-input
patterns:
- pattern: eval($X)
- pattern-where-python: |
not $X.startswith('"')
message: "eval() called with potentially dynamic input"
severity: ERROR
languages: [python]
metadata:
cwe: ["CWE-95"]/**
* @name SQL injection from request parameter
* @description Finds SQL queries constructed from HTTP request parameters
* @kind path-problem
* @severity error
* @id agent-skills/sql-injection
* @tags security
* cwe-089
*/
import python
import semmle.python.dataflow.new.TaintTracking
import semmle.python.ApiGraphs
class SqlInjectionConfig extends TaintTracking::Configuration {
SqlInjectionConfig() { this = "SqlInjectionConfig" }
override predicate isSource(DataFlow::Node source) {
exists(API::CallNode call |
call = API::moduleImport("flask").getMember("request").getMember("args").getMember("get").getACall() and
source = call
)
}
override predicate isSink(DataFlow::Node sink) {
exists(API::CallNode call |
call = API::moduleImport("sqlite3").getMember("Cursor").getMember("execute").getACall() and
sink = call.getArg(0)
)
}
}
from SqlInjectionConfig config, DataFlow::PathNode source, DataFlow::PathNode sink
where config.hasFlowPath(source, sink)
select sink.getNode(), source, sink, "SQL query depends on $@.", source.getNode(), "user input"# GitHub Actions
- name: Semgrep Scan
uses: semgrep/semgrep-action@v1
with:
config: >-
p/owasp-top-ten
p/r2c-security-audit
.semgrep/agent-rules.yml
- name: CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
languages: python, javascript
queries: +.codeql/custom-queries| Platform | Support | Notes |
|---|---|---|
| Cursor | Full | Rule authoring + CI config |
| VS Code | Full | Semgrep extension |
| Windsurf | Full | Static analysis integration |
| Claude Code | Full | Query/rule generation |
| Cline | Full | Security rule authoring |
| aider | Partial | YAML/QL file editing |
codeql semgrep static-analysis sast taint-tracking custom-rules vulnerability-detection ci-cd-security
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.