Skip to content

Commit 2a522e9

Browse files
ryuno2525claude
andcommitted
Add AccessScore report generator and Fiverr fulfillment pipeline
- generate-report.js: single-page HTML audit report - fulfill-order.js: multi-page batch reports for Fiverr orders - scan.js: standalone scanner module - Fiverr tiers: Basic $25 (1 page), Standard $50 (5), Premium $100 (10) - Claude hooks for env reminders and secret leak prevention Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ff5e943 commit 2a522e9

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

.claude/hooks/env-reminder.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
# PreToolUse hook for Bash: Remind about tr -d '\r' when loading .env
3+
# Catches the common Windows line-ending corruption issue
4+
5+
INPUT=$(cat)
6+
7+
# Check if the command loads .env without tr -d '\r'
8+
if echo "$INPUT" | grep -q '\.env' && echo "$INPUT" | grep -q 'export' && ! echo "$INPUT" | grep -q "tr -d"; then
9+
echo '{"ok": false, "reason": "BLOCKED: Loading .env without tr -d \"\\r\" will corrupt values on Windows. Use: export $(cat .env | tr -d \"\\r\" | xargs)"}'
10+
exit 0
11+
fi
12+
13+
exit 0
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# Stop hook: Remind to log work to GitHub issues
3+
# Checks if any significant work was done without GitHub issue updates
4+
5+
cd "$(git rev-parse --show-toplevel 2>/dev/null)" || exit 0
6+
7+
# Count changed files (excluding CLAUDE.md files themselves)
8+
CHANGED_COUNT=$(
9+
{ git diff --name-only 2>/dev/null
10+
git diff --name-only --cached 2>/dev/null
11+
git ls-files --others --exclude-standard 2>/dev/null
12+
} | grep -v 'CLAUDE.md' | grep -v '.claude/' | sort -u | wc -l
13+
)
14+
15+
# If more than 3 non-config files changed, remind about GitHub issues
16+
if [ "$CHANGED_COUNT" -gt 3 ]; then
17+
echo "{\"ok\": false, \"reason\": \"You modified $CHANGED_COUNT files this session. Make sure you've logged this work to a GitHub issue (create one if needed). Every meaningful action needs a GitHub issue per protocol.\"}"
18+
else
19+
exit 0
20+
fi
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
# PreToolUse hook: Detect secrets in file content being written/edited
3+
# Runs before Write and Edit tools to prevent accidental secret exposure
4+
5+
# Read the tool input from stdin
6+
INPUT=$(cat)
7+
8+
# Check for common secret patterns in the content
9+
PATTERNS=(
10+
"sk_live_"
11+
"sk_test_"
12+
"STRIPE_SECRET"
13+
"ghp_"
14+
"gho_"
15+
"AKIA"
16+
"xoxb-"
17+
"xoxp-"
18+
"-----BEGIN.*PRIVATE KEY"
19+
"Bearer [A-Za-z0-9_-]{20,}"
20+
"re_[A-Za-z0-9]{20,}"
21+
)
22+
23+
for pattern in "${PATTERNS[@]}"; do
24+
if echo "$INPUT" | grep -qiE "$pattern"; then
25+
echo '{"ok": false, "reason": "BLOCKED: Detected potential secret/API key in content. Remove the secret and use environment variables instead."}'
26+
exit 0
27+
fi
28+
done
29+
30+
exit 0

accessscore-report

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 7348859472c0867849d7c76f1f2ba710cbe08bd3

0 commit comments

Comments
 (0)