security-scan

Detect hardcoded secrets, vulnerable dependencies, and unpinned GitHub Actions in Ansible collections.

8|7|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/eclipse-slm/slm --skill security-scan-eclipse-slm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-scan
Source: https://github.com/eclipse-slm/slm/tree/main/.agents/skills/security-scan
Command: npx skills add https://github.com/eclipse-slm/slm --skill security-scan-eclipse-slm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gitleaks, pip-audit, safety, trivy.

What problem does it solve? Hardcoded credentials, vulnerable Python packages, and unpinned CI actions can slip into Ansible collections and reach production or public repositories. This Skill scans code, dependencies, and CI workflows to surface these security issues before they are merged or released. ## Core Features & Use Cases - Secret Detection: Uses gitleaks to find hardcoded passwords, API keys, private keys, and cloud credentials in plugins, roles, playbooks, tests, and examples. - Dependency Auditing: Checks requirements.txt and pyproject.toml against known CVEs using pip-audit or safety, including a maintained list of vulnerable Ansible-ecosystem packages. - CI/CD Supply Chain Checks: Flags vulnerable or unpinned GitHub Actions versions and recommends pinning to commit SHAs. - Use Case: Before cutting a release of an Ansible collection, run the scan with the --fix flag to automatically update vulnerable dependencies and pin GitHub Actions, then review the structured severity-ranked report. ## Quick Start Ask the AI to run a security scan on this Ansible collection and report any hardcoded secrets or vulnerable dependencies.

Frequently Asked Questions about security-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan an Ansible collection for hardcoded secrets?▼

Run the security scan, which uses gitleaks to detect passwords, API keys, private keys, and cloud credentials across plugins, roles, playbooks, tests, and examples. Findings are reported with file, line, and remediation guidance.

How to check Python dependencies for known CVEs?▼

The scan runs pip-audit or safety against requirements.txt and pyproject.toml to find packages with known CVEs. It also checks a maintained list of vulnerable Ansible-ecosystem packages like paramiko, cryptography, and requests.

Why pin GitHub Actions to commit SHAs instead of tags?▼

Tags can be moved by maintainers or attackers, so a pinned tag may silently change what code runs. Pinning to a full commit SHA creates an immutable reference, protecting CI pipelines from supply chain tampering.

Can the scan automatically fix security issues it finds?▼

With the --fix flag, it updates vulnerable dependencies in requirements.txt, pins GitHub Actions to commit SHAs, and adds .gitignore entries for secret files. Hardcoded secrets and secrets in git history require manual remediation.

What happens if gitleaks or pip-audit is not installed?▼

The scan checks for tool availability first and prints installation instructions if they are missing. Secret detection is skipped without gitleaks because manual regex patterns produce high false-positive rates.

Does the scan detect secrets already removed from git history?▼

Only with the --deep flag, which searches git history for previously committed credentials. Exposed secrets should be rotated immediately and removed from history using git filter-repo or BFG.