jeremylongshore/tons-of-skills-marketplace / plugins/devops/container-security-scanner/skills/scanning-container-security
scanning-container-security
VerifiedExecute use when you need to work with security and compliance. This skill provides security scanning and vulnerability detection with comprehensive guidance and automation. Trigger with phrases like "scan for vulnerabilities", "implement security controls", or "audit security".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.2 KB |
| assets/README.md | markdown | 65 B |
| references/README.md | markdown | 69 B |
| scripts/README.md | markdown | 460 B |
| scripts/snyk_scan.pyexecutable | script | 2.8 KB |
| scripts/trivy_scan.pyexecutable | script | 2.8 KB |
scripts/trivy_scan.py
View on GitHub#!/usr/bin/env python3
"""
container-security-scanner - trivy_scan.sh
Executes Trivy scan on a given container image and outputs results in JSON format.
Generated: 2025-12-10 03:48:17
"""
import sys
import json
import argparse
from pathlib import Path
def process_file(file_path: Path) -> bool:
"""Process individual file."""
if not file_path.exists():
print(f"β File not found: {file_path}")
return False
print(f"π Processing: {file_path}")
# Add processing logic here based on skill requirements
# This is a template that can be customized
try:
if file_path.suffix == ".json":
with open(file_path) as f:
data = json.load(f)
print(f" β Valid JSON with {len(data)} keys")
else:
size = file_path.stat().st_size
print(f" β File size: {size:,} bytes")
return True
except Exception as e:
print(f" β Error: {e}")
return False
def process_directory(dir_path: Path) -> int:
"""Process all files in directory."""
processed = 0
failed = 0
for file_path in dir_path.rglob("*"):
if file_path.is_file():
if process_file(file_path):
processed += 1
else:
failed += 1
return processed, failed
def main():
parser = argparse.ArgumentParser(
description="Executes Trivy scan on a given container image and outputs results in JSON format."
)
parser.add_argument("input", help="Input file or directory")
parser.add_argument("--output", "-o", help="Output directory")
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose output")
parser.add_argument("--config", "-c", help="Configuration file")
args = parser.parse_args()
input_path = Path(args.input)
print("π container-security-scanner - trivy_scan.sh")
print(" Category: devops")
print(" Plugin: container-security-scanner")
print(f" Input: {input_path}")
if args.config:
if Path(args.config).exists():
with open(args.config) as f:
json.load(f)
print(f" Config: {args.config}")
# Process input
if input_path.is_file():
success = process_file(input_path)
result = 0 if success else 1
elif input_path.is_dir():
processed, failed = process_directory(input_path)
print("\nπ SUMMARY")
print(f" β
Processed: {processed}")
print(f" β Failed: {failed}")
result = 0 if failed == 0 else 1
else:
print(f"β Invalid input: {input_path}")
result = 1
if result == 0:
print("\nβ
Completed successfully")
else:
print("\nβ Completed with errors")
return result
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |