协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
sast-tooling【开发与工程】Implements Static Application Security Testing (SAST) methodologies to identify vulnerabilities in source code during development phases.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: sast-tooling description: Implements Static Application Security Testing (SAST) methodologies to identify vulnerabilities in source code during development phases. license: MIT compatibility: opencode metadata: version: "1.0.0" domain: security triggers: static application security testing, source code analysis, code vulnerabilities, security bugs, early detection, SAST role: implementation scope: implementation output-format: code archetypes: implementation, review anti_triggers: manual testing, qualitative assessment response_profile: verbosity: medium directive_strength: high abstraction_level: operational
Implements SAST methodologies to analyze source code and identify vulnerabilities before deployment. This testing approach scans the codebase for potentially exploitable weaknesses such as SQL injection opportunities, insecure coding practices, and misconfigurations.
Static Application Security Testing (SAST) is a security testing methodology that analyzes source code for potential vulnerabilities before the software is deployed. SAST tools are typically integrated into the development pipeline to ensure security measures are addressed early on, allowing developers to identify issues during the code-writing phase rather than post-deployment.
This example shows how to integrate a SAST tool into a CI/CD pipeline:
import subprocess
def run_sast_tool(codebase:str) -> dict:
"""Run the SAST tool and collect findings."""
command = f'sast-tool --analyze {codebase}'
result = subprocess.run(command, capture_output=True, text=True)
findings = parse_findings(result.stdout) # Assume this function is defined elsewhere
return findings
You can also customize configurations on your SAST tool for different environments:
# Example of using a configuration file for SAST tool
config:
paths:
- /path/to/codebase
- /another/path/to/analyze
rules:
- rule_name_1
- rule_name_2
exclude:
- tests/
- third_party/
Here is how you might implement a more complex SAST analysis that includes various frameworks and languages:
from your_sast_lib import SASTAnalyzer
def analyze_codebase(codebase_paths: List[str]) -> List[dict]:
results = []
analyzer = SASTAnalyzer()
for path in codebase_paths:
result = analyzer.analyze(path)
results.append(result)
return results # Returns a list of findings for each path
Authoritative documentation links for this skill's domain. The model follows markdown links to resolve external references and inline content.