Sast Configuration
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Tool integration
- Security
- MIT
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to implementing and managing Static Application Security Testing (SAST) within software development lifecycles. It covers the setup, configuration, and rule customization for industry-standard tools, helping teams integrate automated security scanning into CI/CD pipelines, manage false positives, and enforce compliance policies.
What it does
- Guides the setup of Semgrep, SonarQube, and CodeQL for automated code analysis.
- Provides patterns for integrating security scans into CI/CD pipelines and pre-commit hooks.
- Explains how to create custom security rules and quality profiles.
- Offers strategies for tuning scan performance and reducing false positives.
- Details methods for establishing security baselines and compliance-focused scanning.
When to use it
- When implementing DevSecOps practices in a new or existing project.
- When you need to automate vulnerability detection in application source code.
- When configuring quality gates to enforce security standards before deployment.
- When you need to create custom security rules tailored to your organization's codebase.
- When optimizing existing SAST pipelines to improve scan speed and accuracy.
Advantages
- Enables early detection of security vulnerabilities during development.
- Supports consistent security enforcement through automated CI/CD integration.
- Allows for highly customized rule sets to match specific project requirements.
- Provides clear paths for managing technical debt and security hotspots.
- Helps teams maintain compliance with industry standards like PCI-DSS and SOC 2.
Usage examples
- “How do I integrate Semgrep into my GitHub Actions pipeline?”
- The skill provides a YAML configuration snippet for GitHub Actions that runs Semgrep with specific security audit rules.
- “I am getting too many false positives from my SAST tool. What should I do?”
- The skill suggests strategies such as tuning rule sensitivity, adding path filters for test files, and creating organization-specific rule exceptions.
- “How can I write a custom rule to detect hardcoded JWT secrets?”
- The skill provides a YAML example demonstrating how to define a custom pattern to flag hardcoded secrets in code.
- “How do I set up a local SonarQube instance for evaluation?”
- The skill provides a Docker command to run a community edition SonarQube container for local security and quality analysis.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/wshobson/sast-configuration/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip sast-configuration.zip -d .agents/skills
Documentation by Seth Hobson
SAST Configuration
Static Application Security Testing (SAST) tool setup, configuration, and custom rule creation for comprehensive security scanning across multiple programming languages.
Overview
This skill provides comprehensive guidance for setting up and configuring SAST tools including Semgrep, SonarQube, and CodeQL. Use this skill when you need to:
Set up SAST scanning in CI/CD pipelines
Create custom security rules for your codebase
Configure quality gates and compliance policies
Optimize scan performance and reduce false positives
Integrate multiple SAST tools for defense-in-depth
Core Capabilities
1. Semgrep Configuration
Custom rule creation with pattern matching
Language-specific security rules (Python, JavaScript, Go, Java, etc.)
CI/CD integration (GitHub Actions, GitLab CI, Jenkins)
False positive tuning and rule optimization
Organizational policy enforcement
2. SonarQube Setup
Quality gate configuration
Security hotspot analysis
Code coverage and technical debt tracking
Custom quality profiles for languages
Enterprise integration with LDAP/SAML
3. CodeQL Analysis
GitHub Advanced Security integration
Custom query development
Vulnerability variant analysis
Security research workflows
SARIF result processing
Quick Start
Initial Assessment
Identify primary programming languages in your codebase
Determine compliance requirements (PCI-DSS, SOC 2, etc.)
Choose SAST tool based on language support and integration needs
Review baseline scan to understand current security posture
Basic Setup
# Semgrep quick start
pip install semgrep
semgrep --config=auto --error
# SonarQube with Docker
docker run -d --name sonarqube -p 9000:9000 sonarqube:10.8-community
# CodeQL CLI setup
gh extension install github/gh-codeql
codeql database create mydb --language=pythonIntegration Patterns
CI/CD Pipeline Integration
# GitHub Actions example
- name: Run Semgrep
uses: returntocorp/semgrep-action@v1
with:
config: >-
p/security-audit
p/owasp-top-tenPre-commit Hook
# .pre-commit-config.yaml
- repo: https://github.com/returntocorp/semgrep
rev: v1.45.0
hooks:
- id: semgrep
args: ['--config=auto', '--error']Best Practices
Start with Baseline
Run initial scan to establish security baseline
Prioritize critical and high severity findings
Create remediation roadmap
Incremental Adoption
Begin with security-focused rules
Gradually add code quality rules
Implement blocking only for critical issues
False Positive Management
Document legitimate suppressions
Create allow lists for known safe patterns
Regularly review suppressed findings
Performance Optimization
Exclude test files and generated code
Use incremental scanning for large codebases
Cache scan results in CI/CD
Team Enablement
Provide security training for developers
Create internal documentation for common patterns
Establish security champions program
Common Use Cases
New Project Setup
# Semgrep: install, then run an auto-config scan that exits non-zero on findings
pip install semgrep
semgrep --config=auto --error
# SonarQube: start a community server for local evaluation, then analyze with sonar-scanner.
# SONAR_ES_BOOTSTRAP_CHECKS_DISABLE skips the Elasticsearch host checks for a local try-out;
# a real deployment needs vm.max_map_count>=524288 and fs.file-max>=131072 on the host instead.
docker run -d --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:10.8-communityCustom Rule Development
rules:
- id: hardcoded-jwt-secret
pattern: jwt.encode($DATA, "...", ...)
message: JWT secret should not be hardcoded
severity: ERRORCompliance Scanning
# PCI-DSS focused scan
semgrep --config p/pci-dss --json -o pci-scan-results.jsonTroubleshooting
High False Positive Rate
Review and tune rule sensitivity
Add path filters to exclude test files
Use nostmt metadata for noisy patterns
Create organization-specific rule exceptions
Performance Issues
Enable incremental scanning
Parallelize scans across modules
Optimize rule patterns for efficiency
Cache dependencies and scan results
Integration Failures
Verify API tokens and credentials
Check network connectivity and proxy settings
Review SARIF output format compatibility
Validate CI/CD runner permissions
Related Skills
STRIDE Analysis Patterns
Threat Mitigation Mapping
Tool Comparison
| Tool | Best For | Language Support | Cost | Integration |
|---|---|---|---|---|
| Semgrep | Custom rules, fast scans | 30+ languages | Free/Enterprise | Excellent |
| SonarQube | Code quality + security | 25+ languages | Free/Commercial | Good |
| CodeQL | Deep analysis, research | 10+ languages | Free (OSS) | GitHub native |
Next Steps
Complete initial SAST tool setup
Run baseline security scan
Create custom rules for organization-specific patterns
Integrate into CI/CD pipeline
Establish security gate policies
Train development team on findings and remediation
Files
- ATTRIBUTION.mdAdded by AutoGineer988 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md5.7 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Python
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/security-scanning/skills/sast-configuration · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download sast-configuration.zip