Receber por email
← Voltar para o catálogo

dev-security-audit

Comprehensive developer workstation security audit — scans for exposed credentials, compromised application data, persistence mechanisms, and supply chain attack indicators. Use this skill whenever the user suspects their machine may be compromised, wants to check for exposed secrets, asks about supply chain attacks, or wants a full security audit of their development environment. Also triggers on

172estrelas
Atualizado há 5 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add sd0xdev/sd0x-dev-flow

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/dev-security-audit/svg)](https://www.skillteca.com.br/skills/dev-security-audit)
#ai

Skills relacionadas

Ver todas de Segurança →

Alerta por categoria

Receba novas skills de Segurança toda segunda

1 email curto, só com as skills novas de Segurança. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Developer Workstation Security Audit

A systematic, multi-phase security audit for developer workstations. Checks for supply chain compromise indicators (via case-based IoC library at references/cases/), scans for exposed credentials across 20+ categories, and generates a prioritized remediation plan.

When to Use

  • User suspects their machine was compromised
  • User wants to check for exposed secrets/credentials
  • User heard about a supply chain attack and wants to check if affected
  • User wants a general security audit of their dev environment
  • Post-incident response: credential rotation planning

When NOT to Use

  • Code-level security review (use /codex-security or /security-review)
  • Dependency vulnerability audit (use /dep-audit)
  • OWASP Top 10 web app audit (use /codex-security)
  • Runtime application security testing

Workflow Overview

sequenceDiagram
    participant U as User
    participant C as Claude
    participant S as System
    C->>S: Phase 0: Supply Chain IoC Dispatch (case-driven)
    C->>S: Phase 1: Credential & Secret Exposure Scan
    C->>S: Phase 2: Application & Browser Data Scan
    C->>S: Phase 3: Persistence & Backdoor Check
    C->>U: Phase 4: Report Generation & Remediation Plan

Run phases sequentially. Each phase produces findings that feed into the final report. Use the reference files for detailed scan targets and IoC lists.

Evidence preservation: Before any cleanup or deletion, always copy/archive artifacts for forensic analysis. Never destroy evidence before the report is generated.

Phase 0: Supply Chain IoC Dispatch

Check for known supply chain compromises using the case library (references/cases/). This phase is conditional — it runs only when matching cases are found.

Dispatch Algorithm

  1. Detect platform: macOS / Linux / Windows
  2. Load case catalog: Read references/cases/README.md for active cases
  3. Scan product presence: For each active case, check if the product is installed on the system
  4. Execute matching cases: Load the case file and run its Detection Commands section

Dispatch Rules

| Condition | Action | |-----------|--------| | No matching case (product not installed) | Skip Phase 0, proceed to Phase 1 | | Single match | Load case file, run detection + interpretation | | Multiple matches | Iterate: execute each case sequentially |

Output Contract

For each matched case, report:

| Field | Description | |-------|-------------| | case_id | From case frontmatter (e.g., PRODUCT-YYYY-MM) | | status | COMPROMISED / INCONCLUSIVE / CLEAN / NOT_INSTALLED | | confidence | From case frontmatter + detection result |

If any case returns COMPROMISED, execute evidence preservation per case file instructions before proceeding.

Phase 1: Credential & Secret Exposure Scan

Scan for ALL sensitive files an attacker with user-space read access could have exfiltrated. This scan reveals credential hygiene issues regardless of supply chain compromise status.

Read references/scan-targets.md for the complete list. Below is the execution strategy.

Scan Strategy

Run scans in parallel where possible (use subagents for independent categories). Group into 3 parallel tracks:

Track A — Cloud & Infrastructure Credentials:

  • AWS (~/.aws/credentials, ~/.aws/config)
  • GCP (~/.config/gcloud/ — credentials.db, access_tokens.db, application_default_credentials.json)
  • Azure (~/.azure/)
  • Kubernetes (~/.kube/config, ~/.kube/custom-contexts/)
  • Terraform (~/.terraform.d/credentials.tfrc.json)
  • Docker (~/.docker/config.json)

Track B — Development Tool Tokens:

  • SSH keys (~/.ssh/)
  • Git credentials (~/.git-credentials, ~/.gitconfig)
  • GitHub CLI (~/.config/gh/)
  • GitLab CLI (~/.config/glab-cli/)
  • npm (~/.npmrc)
  • GPG keys (~/.gnupg/private-keys-v1.d/)

Track C — Application Secrets & History:

  • Shell history token scan (grep for patterns below)
  • .env files (find ~ -maxdepth 5 \( -name ".env" -o -name ".env.*" \) 2>/dev/null | grep -v node_modules | grep -v .git)
  • Crypto wallets (Solana, Electrum, etc.)
  • VPN configs (*.ovpn, WireGuard)

Parallel Scan Merge Rules

| # | Rule | Description | |---|------|-------------| | 1 | Subagent parallel | Tracks A/B/C may run via subagents in parallel for speed | | 2 | Unified output schema | All tracks emit: Category \| Path \| Severity \| Redacted Sample \| Action | | 3 | Dedup by key | Merge results using (Path + Indicator Type + Token Prefix) as dedup key | | 4 | Critical bubble-up | Critical/Critical+ findings surface immediately — do not wait for full scan |

Token Pattern Reference

Use these regex patterns to extract tokens from shell history and .env files:

OpenAI:           sk-[a-zA-Z0-9_-]{20,}
Anthropic:        sk-ant-[a-zA-Z0-9_-]{20,}
GitHub Classic:   gh[posur]_[a-zA-Z0-9]{20,}
GitHub Fine-grain: github_pat_[a-zA-Z0-9_]{20,}
GitLab PAT:       glpat-[a-zA-Z0-9_-]{20,}
AWS Access:       AKIA[A-Z0-9]{16}
AWS Temp:         ASIA[A-Z0-9]{16}
HuggingFace:      hf_[a-zA-Z0-9]{20,}
npm:              npm_[a-zA-Z0-9]{20,}
Docker Hub:       dckr_pat_[a-zA-Z0-9_-]{20,}
Slack:            xox[bsrp]-[a-zA-Z0-9-]{20,}
Stripe:           [rs]k_live_[a-zA-Z0-9]{20,}
Firebase:         AIza[a-zA-Z0-9_-]{30,}
JWT:              eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+
Vercel:           vercel_[a-zA-Z0-9_-]{20,}
Supabase:         sbp_[a-zA-Z0-9]{20,}

When displaying found tokens to the user, always partially redact them (show first 8 and last 4 chars) so they can identify which token it is without fully exposing it in conversation history.

Crypto Wallet Check

Crypto wallets deserve special urgency — asset theft is irreversible:

| Wallet | Path | Key Storage | |--------|------|-------------| | Solana CLI | ~/.config/solana/id.json | Plaintext 64-byte keypair | | Electrum | ~/.electrum/wallets/ | Encrypted (but copyable for offline brute force) | | OneKey | ~/Library/Application Support/@onekeyhq/desktop/ | Encrypted in LevelDB | | Ledger Live | ~/Library/Application Support/Ledger Live/ | Hardware key (safe), but addresses exposed | | Tonkeeper | ~/Library/Application Support/@tonkeeper/desktop/ | Check LevelDB |

For plaintext keys (Solana), immediately check balance via RPC. For encrypted wallets (Electrum), the wallet files could have been copied for offline cracking — advise transferring funds to a new wallet.

Phase 2: Application & Browser Data Scan

User-space RCE can read any application's local data. Electron apps are especially vulnerable because they store data in unencrypted LevelDB.

Electron App Scan

List all Electron apps by checking for LevelDB in Local Storage:

find ~/Library/Application\ Support/*/Local\ Storage/leveldb -maxdepth 0 2>/dev/null

High-priority Electron apps to check:

  • Communication: Slack, Discord, Telegram, LINE, WhatsApp Desktop
  • Dev tools: VS Code, GitKraken, Postman, MongoDB Compass
  • Crypto: OneKey, Ledger Live, Tonkeeper
  • AI: Claude Desktop, ChatGPT Desktop

For each, run strings on the LevelDB files and grep for token, secret, password, auth, session. Always pipe through redaction before output: sed -E 's/(.{8}).{4,}(.{4})/\1****\2/g'. Never print raw secrets to conversation or report — redact at the pipeline level, not as an afterthought.

Browser Data

Browsers store Login Data, Cookies, and Local Storage accessible to user-space processes:

# Chrome profiles
ls ~/Library/Application\ Support/Google/Chrome/*/Login\ Data 2>/dev/null
# Firefox
ls ~/Library/Application\ Support/Firefox/Profiles/*/logins.json 2>/dev/null
# Arc
ls ~/Library/Application\ Support/Arc/*/Login\ Data 2>/dev/null

Note: Chrome's Login Data is encrypted via macOS Keychain. Under RCE, the attacker could potentially decrypt it during an active user session via the security CLI or Chrome DevTools Protocol.

macOS Ke

Compartilhar X LinkedIn