Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/nylas/cli/security-scangit clone --depth 1 https://github.com/nylas/cliWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00017 | $0.00780 |
| Opus 5 | $0.00009 | $0.00390 |
| Sonnet 5 | $0.00003 | $0.00156 |
| Haiku 4.5 | $0.00002 | $0.00078 |
Grade A, and why
security-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Security Scan
Perform a comprehensive security analysis of the codebase.
Target: $ARGUMENTS (leave empty for full scan)
Threat Model
This CLI:
- Stores API credentials (should use system keyring)
- Makes HTTP requests to Nylas API
- Reads/writes local files
- Executes based on user input
Instructions
1. Secret Detection
# Check for hardcoded API keys
grep -rE "nyk_v0[a-zA-Z0-9_]{20,}" --include="*.go" . | grep -v "_test.go"
# Check for credential patterns
grep -rE "(api_key|password|secret|token)\s*[=:]\s*\"[^\"]+\"" --include="*.go" . | grep -v "_test.go" | grep -v "mock.go"
# Check for potential credential logging
grep -rE "fmt\.(Print|Fprint|Sprint|Log).*([Aa]pi[Kk]ey|[Pp]assword|[Ss]ecret|[Tt]oken)" --include="*.go" .
2. Sensitive File Check
# Check for sensitive files in repo
find . -name "*.env*" -o -name "*.pem" -o -name "*.key" -o -name "*credential*" -o -name "*secret*" 2>/dev/null | grep -v ".git"
# Check git history for sensitive files
git log --all --name-only --pretty=format: | grep -E "\.(env|pem|key|p12)$" | sort -u
3. Dependency Vulnerabilities
# Check for known vulnerabilities in Go modules
go list -m all
# Review any outdated or suspicious dependencies
4. Code Security Review
Check for these vulnerabilities:
| Category | What to Look For |
|---|---|
| Command Injection | User input in exec.Command(), os/exec |
| Path Traversal | User input in file paths without sanitization |
| Insecure HTTP | http:// instead of https:// for APIs |
| Weak Crypto | MD5, SHA1 for security purposes |
| Error Exposure | Stack traces or internal errors exposed to users |
5. Authentication & Authorization
- API keys stored securely (keyring, not plaintext)
- No credentials in command-line arguments (visible in ps)
- Tokens not logged or printed
- Secure credential input (no echo)
6. Run Automated Scans
# Run project security scan
make security
# Run Go security linter (if available)
golangci-lint run --enable gosec
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 110 lines · 17 tokens per session scan A c2e00435dc87
security-scan is a command published in the GitHub repository nylas/cli (68 stars, last pushed 13d ago), licensed MIT. It adds 17 tokens to every session and 780 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
create-pr
Create a pull request following the official template.
/release
Release a new version — updates CHANGELOG, pyproject.toml, creates git tag, and pushes.
numbers-to-excel
Convert a Numbers document to Excel.
briefing
Get a daily briefing of today's calendar events, reminders, and optional inbox context.
symfony-api-errors
Design API Platform 4.3 error handling — RFC 7807.
execute-plan
Execute an implementation plan methodically with TDD and continuous validation.