From security-sonarqube
Use when fixing SonarQube SAST alerts — maps SonarQube rule IDs and CWE categories to specific code fix patterns for injection, XSS, weak crypto, and hardcoded credentials
How this skill is triggered — by the user, by Claude, or both
Slash command
/security-sonarqube:sonarqube-remediationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Fix SonarQube SAST alerts by applying rule-specific and CWE-based code transforms. Each fix pattern targets the root cause identified by SonarQube's analysis.
Fix SonarQube SAST alerts by applying rule-specific and CWE-based code transforms. Each fix pattern targets the root cause identified by SonarQube's analysis.
Statement with PreparedStatement
// Bad
Statement stmt = connection.createStatement();
stmt.executeQuery("SELECT * FROM users WHERE id = " + userId);
// Good
PreparedStatement pstmt = connection.prepareStatement("SELECT * FROM users WHERE id = ?");
pstmt.setInt(1, userId);
pstmt.executeQuery();
%s
# Bad
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# Good
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
<, >, &, ", '// Bad
const html = `<div>${userInput}</div>`;
// Good (React)
const html = <div>{userInput}</div>; // Auto-escaped
// Good (vanilla)
const div = document.createElement('div');
div.textContent = userInput;
SecureRandom (Java), secrets (Python), crypto.randomBytes (Node.js)// Bad
MessageDigest md = MessageDigest.getInstance("MD5");
// Good
MessageDigest md = MessageDigest.getInstance("SHA-256");
// Password Hashing (Good)
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
String hash = encoder.encode(password);
os.environ['API_KEY'] (Python), process.env.API_KEY (Node.js)# Bad
API_KEY = "sk-1234567890abcdef"
# Good
API_KEY = os.environ.get('API_KEY')
if not API_KEY:
raise ValueError("API_KEY environment variable not set")
| Rule | CWE | Category |
|---|---|---|
| S2077, S3649 | CWE-89 | SQL Injection |
| S5131 | CWE-79 | Cross-Site Scripting |
| S4426, S5547 | CWE-327 | Weak Cryptography |
| S6437 | CWE-798 | Hard-Coded Credentials |
npx claudepluginhub gagandeepp/software-agent-teams --plugin security-sonarqubeGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.