sast-scanning
Skill by BagelHole
Guides an AI assistant through static application security testing (SAST) using Semgrep, CodeQL, SonarQube and language scanners. It is for teams adding security checks to code review and CI/CD pipelines.
Install sast-scanning
Built from the published package, never by AI.
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills /tmp/DevOps-Security-Agent-Skills && mkdir -p ~/.claude/skills && cp -r /tmp/DevOps-Security-Agent-Skills/security/scanning/sast-scanning ~/.claude/skills/sast-scanningRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/BagelHole/DevOps-Security-Agent-Skills /tmp/DevOps-Security-Agent-Skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/DevOps-Security-Agent-Skills/security/scanning/sast-scanning ~/.gemini/antigravity-cli/skills/sast-scanningAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill covers static application security testing (SAST) of source code. It explains Semgrep, CodeQL and SonarQube, and lists language tools such as Bandit for Python, ESLint security rules for JavaScript and Brakeman for Ruby. It includes a tool comparison table, installation steps and sample configurations.
The skill provides example Semgrep custom rules, a CodeQL workflow for GitHub Actions, a SonarQube Docker setup with scanner properties, and a shell script that fails a build on critical or high findings. It is aimed at teams that want to add security gates to CI/CD pipelines, automate code security reviews, or find vulnerabilities before deployment, for example as part of a secure SDLC or compliance work.
Written from the project's SKILL.md and checked against it.
What it can do
- Semgrep scanningRuns Semgrep with default, OWASP and language rulesets, and outputs JSON or SARIF.
- Semgrep custom rulesExample YAML rules for hardcoded passwords, SQL injection and insecure randomness.
- CodeQL workflowA GitHub Actions workflow for CodeQL analysis with the security-and-quality query suite.
- CodeQL custom queriesAn example CodeQL query for SQL injection in Python.
- SonarQube setupA Docker Compose file, scanner properties and GitHub Actions steps for SonarQube.
- Language scannersSetup and config for Bandit (Python), ESLint security plugin (JavaScript) and Brakeman (Ruby).
- Quality gatesExample SonarQube security gate conditions and a bash script that fails on critical or high findings.
What you need
- Python with pip, or Homebrew, to install Semgrep
- Docker to run SonarQube and PostgreSQL
- A CI/CD pipeline such as GitHub Actions
- Source code access
- SonarQube and Semgrep tokens stored as CI secrets
Try asking
- Set up a Semgrep scan in my GitHub Actions pipeline on pull requests
- Write a Semgrep rule that flags hardcoded passwords in Python and JavaScript
- Create a bash gate script that fails the build on critical vulnerabilities
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: security/scanning/sast-scanning/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to sast-scanning
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
sast-scanning: common questions
Which languages does this SAST skill cover?
Semgrep and SonarQube list 30+ and 25+ languages respectively in the comparison table. CodeQL is listed for 10+ languages, and the examples cover Python, JavaScript and Ruby.
How does it deal with false positives?
The skill suggests tuning rules, adding suppressions and using a baseline for existing code. It also says to document false positive suppressions.
Does it fix the vulnerabilities it finds?
The source describes finding vulnerabilities before deployment and gating builds. It does not describe automatic fixes, apart from a fix field in one example rule.
How do I install sast-scanning?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is sast-scanning free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is sast-scanning safe to use?
It scores 62 of 100. Grades: maintenance D, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to sast-scanning?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
