LeoYeAI/agent-master-skills / skills/agentaudit-skill
agentaudit-skill
FlaggedAutomatic security gate that checks packages against a vulnerability database before installation. Use before any npm install, pip install, yarn add, or package manager operation.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 33.7 KB |
| SKILL.md | skill md | 18.0 KB |
| _meta.json | config | 297 B |
| install.sh | script | 5.7 KB |
| prompts/audit-prompt.md | markdown | 36.6 KB |
| prompts/review-prompt.md | markdown | 2.8 KB |
| references/API-REFERENCE.md | markdown | 4.1 KB |
| references/AUDIT-METHODOLOGY.md | markdown | 6.8 KB |
| references/DETECTION-PATTERNS.md | markdown | 5.9 KB |
| references/REPORT-FORMAT.md | markdown | 5.0 KB |
| references/TROUBLESHOOTING.md | markdown | 4.4 KB |
| references/TRUST-SCORING.md | markdown | 2.2 KB |
| scripts/_curl-retry.sh | script | 850 B |
| scripts/_load-key.sh | script | 1.6 KB |
| scripts/check.mjs | script | 6.3 KB |
| scripts/check.sh | script | 5.7 KB |
| scripts/gate.mjs | script | 5.2 KB |
| scripts/gate.sh | script | 4.9 KB |
| scripts/register.mjs | script | 4.7 KB |
| scripts/register.sh | script | 3.4 KB |
| scripts/rotate-key.sh | script | 2.3 KB |
| scripts/upload.mjs | script | 7.3 KB |
| scripts/upload.sh | script | 8.4 KB |
| scripts/verify.sh | script | 3.6 KB |
scripts/rotate-key.sh
View on GitHub#!/usr/bin/env bash
# Rotate your AgentAudit API key
# Usage: bash scripts/rotate-key.sh
# Requires: existing API key in credentials or AGENTAUDIT_API_KEY env var
set -euo pipefail
# Dependencies
for cmd in curl jq; do
if ! command -v "$cmd" &>/dev/null; then
echo "❌ Required dependency '$cmd' not found." >&2
exit 1
fi
done
REGISTRY_URL="https://www.agentaudit.dev"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILL_CRED_FILE="$SCRIPT_DIR/../config/credentials.json"
USER_CRED_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/agentaudit"
USER_CRED_FILE="$USER_CRED_DIR/credentials.json"
# ── Load shared helpers ──
source "$SCRIPT_DIR/_load-key.sh"
source "$SCRIPT_DIR/_curl-retry.sh"
API_KEY="$(load_api_key)"
if [ -z "$API_KEY" ]; then
echo "❌ No API key found. Register first: bash scripts/register.sh <agent-name>" >&2
exit 1
fi
echo "🔄 Rotating API key..."
RESPONSE=$(curl_retry -s -w "\n%{http_code}" -X POST "$REGISTRY_URL/api/keys/rotate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY")
HTTP_CODE=$(echo "$RESPONSE" | tail -1)
BODY=$(echo "$RESPONSE" | sed '$d')
if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then
NEW_KEY=$(echo "$BODY" | jq -r '.api_key')
AGENT_NAME=$(echo "$BODY" | jq -r '.agent_name')
if [ -z "$NEW_KEY" ] || [ "$NEW_KEY" = "null" ]; then
echo "❌ Rotation failed — no new key in response" >&2
echo "$BODY" >&2
exit 1
fi
# Save to skill-local config
mkdir -p "$(dirname "$SKILL_CRED_FILE")"
( umask 077; echo "$BODY" | jq '{api_key: .api_key, agent_name: .agent_name}' > "$SKILL_CRED_FILE" )
# Save to user-level config (backup)
mkdir -p "$USER_CRED_DIR"
( umask 077; echo "$BODY" | jq '{api_key: .api_key, agent_name: .agent_name}' > "$USER_CRED_FILE" )
echo "✅ Key rotated successfully!"
echo " Agent: $AGENT_NAME"
echo " New key: ${NEW_KEY:0:6}...${NEW_KEY: -4}"
echo ""
echo " Saved to:"
echo " • $SKILL_CRED_FILE"
echo " • $USER_CRED_FILE"
if [ -n "${AGENTAUDIT_API_KEY:-}" ]; then
echo ""
echo " ⚠️ You also have AGENTAUDIT_API_KEY set in your environment."
echo " Update it from the saved credentials:"
echo " export AGENTAUDIT_API_KEY=\"\$(jq -r .api_key $USER_CRED_FILE)\""
fi
else
echo "❌ Key rotation failed (HTTP $HTTP_CODE):" >&2
echo "$BODY" >&2
exit 1
fi
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: 194k | Updated | Claude CodeCodex | Verified | Install |