sast-configuration
यह क्या करती है
यह टूल आपके कोड में सुरक्षा खामियाँ ढूँढने वाले प्रोग्राम सेट करने में मदद करता है। इसमें Semgrep, SonarQube और CodeQL जैसे टूल चुनकर उन्हें अपनी ज़रूरत के हिसाब से बदला जा सकता है, ताकि समस्याएँ विफलता या हमले से पहले पकड़ी जा सकें।
कब इस्तेमाल करें
- ✓किसी नए project के लिए security scanning सेट करते समय।
- ✓जब आप किसी खास तरह की गलती ढूँढने के लिए अपने नियम बनाना चाहते हों।
- ✓कोड के automated build process में सुरक्षा जाँच जोड़ते समय।
Skill का लिंक
https://github.com/wshobson/agents/blob/main/plugins/security-scanning/skills/sast-configuration/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“Python कोड में आम vulnerabilities ढूँढने के लिए Semgrep सेट करो और उसे GitHub Actions के साथ जोड़ो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
आप सुरक्षा टूल चुनते हैं (जैसे Semgrep, SonarQube, CodeQL), तय करते हैं कि किस तरह की गलतियाँ ढूँढनी हैं, और ये टूल कैसे काम करें। इसमें अपने custom rules बनाना या इन्हें development workflow में जोड़ना शामिल हो सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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=python
Integration Patterns
CI/CD Pipeline Integration
# GitHub Actions example
- name: Run Semgrep
uses: returntocorp/semgrep-action@v1
with:
config: >-
p/security-audit
p/owasp-top-ten
Pre-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
./scripts/run-sast.sh --setup --language python --tools semgrep,sonarqube
Custom Rule Development
# See references/semgrep-rules.md for detailed examples
rules:
- id: hardcoded-jwt-secret
pattern: jwt.encode($DATA, "...", ...)
message: JWT secret should not be hardcoded
severity: ERROR
Compliance Scanning
# PCI-DSS focused scan
semgrep --config p/pci-dss --json -o pci-scan-results.json
Troubleshooting
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
Tool Comparison
| Tool | Best For | Language Support | Cost | Integration |
…
अक्सर पूछे जाने वाले सवाल
SAST क्या है?
SAST का मतलब है Static Application Security Testing। यह कोड को चलाए बिना उसकी सुरक्षा जाँचने का तरीका है, जिसमें जानी-पहचानी vulnerability patterns ढूँढे जाते हैं।
मैं कौन से टूल सेट कर सकता हूँ?
आप Semgrep, SonarQube, CodeQL और कुछ अन्य टूल भी सेट कर सकते हैं।
यह खामियाँ ढूँढने में कैसे मदद करता है?
सेट किए गए टूल आपके कोड को जानी-पहचानी सुरक्षा कमज़ोरियों के लिए जाँचते हैं, और अगर आप custom rules बनाते हैं, तो वे आपके बताए गए समस्या वाले patterns भी ढूँढेंगे।
जानकारी
लेखक का मूल विवरण
Configure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code. Use when setting up security scanning, implementing DevSecOps practices, or automating code vulnerability detection.
repo: wshobson/agents
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6779
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
screen-reader-testing
41kआपके एजेंट को screen readers का इस्तेमाल करके वेबसाइटों की जांच करने देता है, ताकि यह पक्का हो सके कि वे accessible हैं।
wcag-audit-patterns
41kआपके एजेंट को वेबसाइटों का accessibility audit करने और WCAG guidelines के हिसाब से समस्याएं ठीक करने में मदद करता है।
multi-reviewer-patterns
41kआपके एजेंट को कई code reviews को एक साथ चलाने देता है। यह एक जैसे findings हटाता है और सारी रिपोर्ट को एक जगह जोड़ता है।
parallel-debugging
41kआपके एजेंट को parallel जांच के साथ जटिल समस्याओं को debug करने और root cause analysis में मदद करता है।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।