security-tool-development
/security-tool-development
Write defensive security tools and scripts (log parsers, IOC scanners, triage collectors, enrichment and automation utilities) to production quality — safe input handling, no shell injection, bounded resources, secret redaction, least privilege, tests, hardened CI and release hygiene — starting from a bundled tested project scaffold. Use when coding a blue-team tool, reviewing a security script before it runs on production systems, or turning an ad-hoc analysis script into a maintained tool.
- Author
- kaandgnsh ↗
- Repository
- Claude-Blue ↗
- Licence
- MIT
- Last repository change
- 01.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 1
- HTML comments
- 0
- URLs in SKILL.md
- 4
No signals detected. Repository changed on 01.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
- 1 scripts in this package. Review them before installing, as Claude may execute them.
Scripts: scripts/new_tool.py
What it does and when to use it
Write defensive security tools and scripts (log parsers, IOC scanners, triage collectors, enrichment and automation utilities) to production quality — safe input handling, no shell injection, bounded resources, secret redaction, least privilege, tests, hardened CI and release hygiene — starting from a bundled tested project scaffold. Use when coding a blue-team tool, reviewing a security script before it runs on production systems, or turning an ad-hoc analysis script into a maintained tool.
Original author description
Write defensive security tools and scripts (log parsers, IOC scanners, triage collectors, enrichment and automation utilities) to production quality — safe input handling, no shell injection, bounded resources, secret redaction, least privilege, tests, hardened CI and release hygiene — starting from a bundled tested project scaffold. Use when coding a blue-team tool, reviewing a security script before it runs on production systems, or turning an ad-hoc analysis script into a maintained tool.
How it works
- Start from the scaffold
- Engineering rules
- Review checklist for a security script before production
- Related skills
- References
SKILL.md preview
--- name: security-tool-development description: Write defensive security tools and scripts (log parsers, IOC scanners, triage collectors, enrichment and automation utilities) to production quality — safe input handling, no shell injection, bounded resources, secret redaction, least privilege, tests, hardened CI and release hygiene — starting from a bundled tested project scaffold. Use when coding a blue-team tool, reviewing a security script before it runs on production systems, or turning an ad-hoc analysis script into a maintained tool. license: MIT metadata: category: security-engineering version: "2.1.0" verification: tested --- # Security Tool Development Defensive tools run on sensitive systems, often with elevated rights, against attacker-controlled input such as logs, emails, samples and PCAPs. Treat every input as hostile. ## Start from the scaffold ```sh python3 scripts/new_tool.py log-sentry --dir ~/src --description "Scan logs for leaked credentials." cd ~/src/log-sentry && PYTHONPATH=src python -m unittest discover -s tests -v ``` The scaffold refuses to overwrite an existing directory and generates: - `cli.py`: argparse, clear exit codes (0 ok, 2 bad input), `--json` output, and logic kept as a pure function so it is testable; - `safe.py` with four helpers: - `read_bounded` (regular files only, size cap); - `write_atomic` (temp file and rename, mode 0600); - `run` (argument lists only, no shell, timeout; rejects shell strings); - `redact` (masks tokens, passwords, AWS keys); - unit tests, `pyproject.toml`, README, SECURITY.md; - CI with SHA-pinned actions, `contents: read`, ruff, bandit and tests. ## Engineering rules | Area | Rule | |---|---| | Input | Validate types, ranges and formats at the boundary; reject unknown fields; cap sizes, recursion depth and decompressed size (zip bombs); never `eval`/`pickle`/`yaml.load` untrusted data (`yaml.safe_load`, `json`) | | Processes | `subprocess.run([...], shell=False, timeout=...)`; never build shell strings from input; resolve executables to absolute paths when running privileged | | Files | Use `pathlib`, reject `..` and absolute paths from archives (Zip Slip), don't follow symlinks in untrusted trees, write atomically, restrictive permissions for outputs containing evidence | | Network | TLS verification on, timeouts, allow-list destinations; for URL fetching from untrusted input, block private/metadata ranges (SSRF) | | Secrets | From environment/secret store only; never logged — run output through `redact`; no secrets in argv (visible in `ps`) | | Privilege | Run unprivileged by default; request elevation only for the specific step, and document why | | Errors | Fail closed; distinct exit codes; no stack traces with sensitive data to end users | | Output | Machine-readable (JSON/CSV) plus human summary; deterministic ordering for diffing; UTC ISO-8601 timestamps | | Dependencies | Minimal; pinned with hashes for releases (`pip-compile --generate-hashes`); scanned (`sca-dependency-risk`) | | Tests | Unit tests for parsing edge cases and malicious input (oversized, malformed, injection strings); fixtures with sanitized real data | | Release | Signed tags/artifacts (`artifact-signing`), changelog, SECURITY.md | ## Review checklist for a security script before production - [ ] Runs read-only unless the task requires changes, and supports `--dry-run` for changes. - [ ] No `shell=True`, `os.system`, backticks, `eval`; every external call has a timeout. - [ ] Handles hostile input without crashing or hanging (tests prove it). - [ ] Does not exfiltrate data: no telemetry, and any external lookups are documented and optional. - [ ] Logs actions with timestamps for the case record, without secrets. - [ ] Bash: `set -euo pipefail`, `LC_ALL=C` for regex/ranges (locale-dependent `[a-z]` breaks in e.g. `tr_TR`), quoted variables, `shellcheck` clean. ## Related skills `secure-build-workflow`, `secure-code-review`, `github-actions-hardening`, `sca-dependency-risk` ## References - OWASP Secure Coding Practices: https://owasp.org/www-project-secure-coding-practices-quick-reference-guide/ - Python subprocess security considerations: https://docs.python.org/3/library/subprocess.html#security-considerations - Bandit: https://bandit.readthedocs.io/ - ShellCheck: https://www.shellcheck.net/
Files in this package (2)
- SKILL.md 4 KB
- scripts/new_tool.py 10 KB
Versions
The database has no other skills named security-tool-development.
Database snapshot: 13.11.2026 · package version cb9df865d515 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100log-analysis-security
Execute log analysis security operations. Auto-activating skill for Security Advanced. Triggers on: log analysis security, log analysis security Part of the Security Advanced skill category. Use when working with log analysis security functionality. Trigger with phrases like… - 100building-threat-intelligence-enrichment-in-splunk
Build automated IOC enrichment pipelines in Splunk Enterprise Security by ingesting threat feeds into KV Store collections and correlating them against security events via lookup tables, modular inputs, and the Threat Intelligence Framework. Use when wiring threat intel into… - 100security
Full security audit of the project: scanners, a manual OWASP Top 10 and CWE Top 25 sweep, business-logic and race-condition flaws, each finding verified, then tracked and fixed safely. Use for /landspec:security, before a release, or when the user asks whether the software is secure. - 100proactive-defense
Plans and executes authorized defensive security operations: business security checks, log review, attack-surface baselines, patrols, alert triage, incident response, and attack tracing. Use when the user asks for 主动防御、业务安全检查、日志检查、安全巡检、告警处置、攻击溯源 or equivalent defensive work. - 100intel-to-detection
Turn threat intelligence (reports, advisories, IOC feeds) into defensive action — exposure check, retro-hunt, behaviour detections from TTPs, IOC watchlists with expiry, and mitigations — and track what was done. Use when a new threat report or CISA/vendor advisory arrives and… - 90secure-build-workflow
Engineering standard for building defensive security artifacts — firewalls, hardening configs, detection pipelines, IDS/log shipping deployments, security tools and IaC — from requirements and threat model through generation, automated validation, isolated testing, staged…