agentleFS
Twodragon0Twodragon0/claudesec/scripts/AGENTS.md

claudesec / scripts

AGENTS.md16 starsChanged 6 months agoMITView on GitHub

Automation scripts for scan execution, dashboard building, asset collection, and data synchronization. Most scripts are standalone bash or Python 3 — no framework required.

  • Reads credentials

The file

Files
AGENTS.md

AGENTS.md — scripts/

<!-- Parent: ../AGENTS.md --><!-- Generated: 2026-07-07 -->

Purpose

Automation scripts for scan execution, dashboard building, asset collection, and data synchronization. Most scripts are standalone bash or Python 3 — no framework required.

Key Scripts

ScriptLanguagePurpose
run-scan.shbashRun scanner locally
run-scan-docker.shbashRun scanner in Docker
run-dashboard-safe.shbashFull scan + serve with port fallback
run-dashboard-docker.shbashDashboard workflow in Docker
run-full-dashboard.shbashFull scan + all integrations + serve
build-dashboard.pyPythonCollect data from all sources, build HTML
collect-assets.shbashCollect assets from Jamf, AWS, etc.
asset-gsheet-sync.pyPythonSync asset data to Google Sheets
full-asset-sync.pyPythonFull multi-source sync to Sheets
sync-notion-audits-mcp.pyPythonSync audit evidence to Notion (MCP)
sync-scan-to-dashboard.shbashPipeline: scan result → dashboard
sync-cost-xlsx.pyPythonSync SaaS cost data from Excel
token-expiry-gate.pyPythonEnforce token expiry before scans
isms-p-report.pyPythonGenerate ISMS-P compliance report
setup.shbashInstall hooks, templates, virtualenv
setup-legal-intel.shbashClone/update legalize-kr and GitHub Repo MCP, then write .mcp.json
legalize-search.shbashSearch Korean law Markdown and inspect law history from local mirror
run-github-repo-mcp.shbashLaunch local GitHub Repo MCP build with npx fallback
gh-merge-ready-pr.shbashWait for GitHub checks and mergeability propagation, then merge a PR with retries
gh_rerun_stuck_checks.pyPythonDetect check-runs stuck in_progress after their workflow run CONCLUDED, and re-run the owning workflow (--rerun); reports only by default
quick-start.shbashDocker-first onboarding
lint-shell.shbashShellCheck wrapper (local + CI)
gsheet-auth.pyPythonGoogle Sheets OAuth helper
gsheet-auth-setup.pyPythongspread OAuth2 auth setup guide/helper
update-pc-sheet.pyPythonPC inventory sheet updater
pre-push.shbashGit pre-push hook source (blocks direct push to main)
sync-repo-protection.shbashSync GitHub branch-protection / ruleset to the codified config (backs protection-drift-watch.yml)
check-pull-request-target-guard.pyPythonAudit workflows' pull_request_target triggers for the fork guard (backs lint.yml's workflow-fork-guard)
check-prowler-python-ceiling.shbashWatch prowler's PyPI metadata for the Python <3.13 ceiling (backs prowler-python-watch.yml)
dev-machine-hardening.shbashmacOS dev-machine hardening helper
github-setup-labels.shbashCreate the recommended GitHub labels for this repo
og-meta-verify.shbashFetch the deployed page's OG/Twitter meta + image and verify
run-prowler-k8s.shbashRun a Prowler K8s scan as an in-cluster Pod (EKS)
run-asset-sync.shbashRun the Google Sheets asset-management sync
sync-notion-licenses.pyPythonSync the Notion software-license DB → dashboard-data.json
update-license-active-accounts.pyPythonUpdate the license sheet's active_accounts column from real usage
generate_ai_devsecops_ppt.pyPythonGenerate the AI-DevSecOps PPTX deck
generate_ai_devsecops_from_template.pyPythonBuild the AI-DevSecOps deck from a template
generate_security_seminar_template_ppt.pyPythonGenerate the 30-min security-seminar PPTX template
verify-shell-coverage-docker.shbashRun the CI scanner-shell-coverage kcov flow locally in an ubuntu+kcov container (kcov does not work on macOS); pre-verify the 90% bash floor

For AI Agents

Conventions

  • Bash scripts: ShellCheck-clean. Run ./scripts/lint-shell.sh before committing.
  • Python scripts: PEP 8. Use os.getenv() for all credentials — no hardcoded values.
  • Dashboard scripts read from ~/Desktop/.env for API keys (not committed).
  • claudesec-dashboard.html (the security-scan dashboard; no longer served — its compliance/OWASP rollups are published into scan-report.json and rendered inside the ISMS dashboard, and /scan.html 301s to /) plus scan-report.json are generated artifacts in .gitignore — regenerated by dashboard-refresh.yml (a repo self-scan; no external API keys needed).
  • claudesec-asset-dashboard.html is committed on purpose (it is NOT gitignored): build-dashboard.py needs operator secrets (Datadog / Notion / Jamf / Google Sheets) and produces org-specific asset data, so it is not auto-regenerated in public CI. An operator rebuilds it locally (python3 scripts/build-dashboard.py) and commits the refresh.

Required Environment Variables

VariableUsed by
DD_API_KEY, DD_APP_KEYbuild-dashboard.py, sync-scan-to-dashboard.sh
ASSET_SHEET_ID, AI_SHEET_IDasset-gsheet-sync.py, full-asset-sync.py
NOTION_TOKEN, NOTION_DB_IDsync-notion-audits-mcp.py
GITHUB_TOKENrun-github-repo-mcp.sh, MCP clients using GitHub Repo MCP
JAMF_URL, JAMF_TOKENcollect-assets.sh
GH_TOKEN / GITHUB_TOKENtoken-expiry-gate.py, scanner saas checks

Running the Dashboard

# Safe mode (auto port fallback, no Docker required)
./scripts/run-dashboard-safe.sh

# Kill stale process and serve
./scripts/run-dashboard-safe.sh --kill-port

# Docker mode
./scripts/run-dashboard-docker.sh

# Build only, no serve
./scripts/run-full-dashboard.sh --no-serve

Dashboard served at http://localhost:11777/.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.