cc-safe-setup 28.4.7 → 28.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/examples/auto-approve-docker.sh +1 -0
- package/examples/auto-approve-test.sh +1 -0
- package/examples/auto-compact-prep.sh +19 -8
- package/examples/auto-git-checkpoint.sh +1 -0
- package/examples/backup-before-refactor.sh +1 -0
- package/examples/branch-naming-convention.sh +1 -0
- package/examples/check-accessibility.sh +1 -0
- package/examples/check-aria-labels.sh +1 -0
- package/examples/check-charset-meta.sh +1 -0
- package/examples/check-cookie-flags.sh +1 -0
- package/examples/check-cors-config.sh +1 -0
- package/examples/check-csp-headers.sh +1 -0
- package/examples/check-csrf-protection.sh +1 -0
- package/examples/check-dependency-age.sh +1 -0
- package/examples/check-dependency-license.sh +1 -0
- package/examples/check-dockerfile-best-practice.sh +1 -0
- package/examples/check-error-boundaries.sh +1 -0
- package/examples/check-error-handling.sh +1 -0
- package/examples/check-error-message.sh +1 -0
- package/examples/check-error-stack.sh +1 -0
- package/examples/check-favicon.sh +1 -0
- package/examples/check-git-hooks-compat.sh +1 -0
- package/examples/check-gitattributes.sh +1 -0
- package/examples/check-https-redirect.sh +1 -0
- package/examples/check-input-validation.sh +1 -0
- package/examples/check-lang-attribute.sh +1 -0
- package/examples/check-npm-scripts-exist.sh +1 -0
- package/examples/check-package-size.sh +1 -0
- package/examples/check-port-availability.sh +1 -0
- package/examples/check-rate-limiting.sh +1 -0
- package/examples/check-return-types.sh +1 -0
- package/examples/check-semantic-versioning.sh +1 -0
- package/examples/check-test-naming.sh +1 -0
- package/examples/check-tls-version.sh +1 -0
- package/examples/check-viewport-meta.sh +1 -0
- package/examples/claudemd-enforcer.sh +1 -0
- package/examples/cors-star-warn.sh +1 -0
- package/examples/docker-volume-guard.sh +1 -0
- package/examples/edit-verify.sh +1 -0
- package/examples/env-naming-convention.sh +1 -0
- package/examples/env-prod-guard.sh +1 -0
- package/examples/env-required-check.sh +1 -0
- package/examples/file-size-limit.sh +1 -0
- package/examples/git-hook-bypass-guard.sh +1 -0
- package/examples/git-merge-conflict-prevent.sh +1 -0
- package/examples/git-message-length.sh +1 -0
- package/examples/git-submodule-guard.sh +1 -0
- package/examples/git-tag-guard.sh +1 -0
- package/examples/gitignore-check.sh +1 -0
- package/examples/log-level-guard.sh +1 -0
- package/examples/max-file-count-guard.sh +1 -0
- package/examples/max-file-delete-count.sh +1 -0
- package/examples/max-function-length.sh +1 -0
- package/examples/max-import-count.sh +1 -0
- package/examples/max-subagent-count.sh +1 -0
- package/examples/mcp-tool-guard.sh +1 -0
- package/examples/no-absolute-import.sh +1 -0
- package/examples/no-alert-confirm-prompt.sh +1 -0
- package/examples/no-anonymous-default-export.sh +1 -0
- package/examples/no-any-type.sh +1 -0
- package/examples/no-assignment-in-condition.sh +1 -0
- package/examples/no-callback-hell.sh +1 -0
- package/examples/no-circular-dependency.sh +1 -0
- package/examples/no-cleartext-storage.sh +1 -0
- package/examples/no-commented-code.sh +1 -0
- package/examples/no-commit-fixup.sh +1 -0
- package/examples/no-console-assert.sh +1 -0
- package/examples/no-console-error-swallow.sh +1 -0
- package/examples/no-console-in-prod.sh +1 -0
- package/examples/no-console-log.sh +1 -0
- package/examples/no-console-time.sh +1 -0
- package/examples/no-curl-upload.sh +1 -0
- package/examples/no-dangerouslySetInnerHTML.sh +1 -0
- package/examples/no-debug-in-commit.sh +1 -0
- package/examples/no-deep-nesting.sh +1 -0
- package/examples/no-default-credentials.sh +1 -0
- package/examples/no-disabled-test.sh +1 -0
- package/examples/no-document-write.sh +1 -0
- package/examples/no-empty-function.sh +1 -0
- package/examples/no-eval-in-template.sh +1 -0
- package/examples/no-eval.sh +1 -0
- package/examples/no-exec-user-input.sh +1 -0
- package/examples/no-floating-promises.sh +1 -0
- package/examples/no-force-install.sh +1 -0
- package/examples/no-git-rebase-public.sh +1 -0
- package/examples/no-global-state.sh +1 -0
- package/examples/no-hardcoded-port.sh +1 -0
- package/examples/no-hardcoded-url.sh +1 -0
- package/examples/no-helmet-missing.sh +1 -0
- package/examples/no-http-without-https.sh +1 -0
- package/examples/no-inline-style.sh +1 -0
- package/examples/no-innerhtml.sh +1 -0
- package/examples/no-install-global.sh +1 -0
- package/examples/no-jwt-in-url.sh +1 -0
- package/examples/no-large-commit.sh +1 -0
- package/examples/no-localhost-expose.sh +1 -0
- package/examples/no-magic-number.sh +1 -0
- package/examples/no-md5-sha1.sh +1 -0
- package/examples/no-mixed-line-endings.sh +1 -0
- package/examples/no-mutation-in-reducer.sh +1 -0
- package/examples/no-nested-ternary.sh +1 -0
- package/examples/no-network-exfil.sh +1 -0
- package/examples/no-open-redirect.sh +1 -0
- package/examples/no-package-downgrade.sh +1 -0
- package/examples/no-package-lock-edit.sh +1 -0
- package/examples/no-path-join-user-input.sh +1 -0
- package/examples/no-port-bind.sh +1 -0
- package/examples/no-process-exit.sh +1 -0
- package/examples/no-prototype-pollution.sh +1 -0
- package/examples/no-push-without-ci.sh +1 -0
- package/examples/no-raw-password-in-url.sh +1 -0
- package/examples/no-root-write.sh +1 -0
- package/examples/no-secrets-in-logs.sh +1 -0
- package/examples/no-sensitive-log.sh +1 -0
- package/examples/no-sleep-in-hooks.sh +1 -0
- package/examples/no-string-concat-sql.sh +1 -0
- package/examples/no-sudo-guard.sh +1 -0
- package/examples/no-sync-fs.sh +1 -0
- package/examples/no-todo-in-merge.sh +1 -0
- package/examples/no-todo-without-issue.sh +1 -0
- package/examples/no-unused-import.sh +1 -0
- package/examples/no-var-keyword.sh +1 -0
- package/examples/no-wildcard-cors.sh +1 -0
- package/examples/no-wildcard-delete.sh +1 -0
- package/examples/no-wildcard-import.sh +1 -0
- package/examples/no-with-statement.sh +1 -0
- package/examples/no-write-outside-src.sh +1 -0
- package/examples/no-xml-external-entity.sh +1 -0
- package/examples/npm-audit-warn.sh +1 -0
- package/examples/npm-publish-guard.sh +1 -0
- package/examples/npm-script-injection.sh +1 -0
- package/examples/package-json-guard.sh +1 -0
- package/examples/pr-description-check.sh +1 -0
- package/examples/prefer-const.sh +1 -0
- package/examples/prefer-optional-chaining.sh +1 -0
- package/examples/rate-limit-guard.sh +1 -0
- package/examples/readme-exists-check.sh +1 -0
- package/examples/session-state-saver.sh +1 -0
- package/examples/session-summary.sh +1 -0
- package/examples/skill-gate.sh +1 -0
- package/examples/sql-injection-detect.sh +1 -0
- package/examples/subagent-budget-guard.sh +1 -0
- package/examples/test-before-commit.sh +1 -0
- package/examples/timezone-guard.sh +1 -0
- package/examples/usage-warn.sh +1 -0
- package/examples/write-test-ratio.sh +1 -0
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
if echo "$CONTENT" | grep -qE "http://localhost:[0-9]+|http://127\.0\.0\.1"; then echo "NOTE: Hardcoded localhost URL — use env var instead" >&2; fi
|
package/examples/no-innerhtml.sh
CHANGED
package/examples/no-md5-sha1.sh
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
echo "$CONTENT" | grep -qE "(state\.\w+\s*=|\.push\(|\.splice\()" && echo "$CONTENT" | grep -q "reducer\|Reducer" && echo "WARNING: Direct state mutation in reducer" >&2
|
package/examples/no-port-bind.sh
CHANGED
package/examples/no-sync-fs.sh
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
COMMAND=$(cat | jq -r ".tool_input.command // empty" 2>/dev/null); echo "$COMMAND" | grep -qE "git\s+merge" && git diff --cached 2>/dev/null | grep -q "TODO" && echo "WARNING: TODO markers in merge target" >&2
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
echo "$CONTENT" | grep -qE "TODO[^(]|FIXME[^(]" && ! echo "$CONTENT" | grep -qE "TODO\(#|FIXME\(#" && echo "NOTE: TODO without issue reference" >&2
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
echo "$CONTENT" | grep -qE "^import.*from" && echo "$CONTENT" | grep -cE "^import" | xargs -I{} test {} -gt 10 && echo "NOTE: Many imports — check for unused ones" >&2
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
echo "$CONTENT" | grep -qE "parseXML|xml2js|DOMParser|libxml" && echo "$CONTENT" | grep -q "ENTITY" && echo "WARNING: Possible XXE in XML parsing" >&2
|
package/examples/prefer-const.sh
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
CONTENT=$(cat | jq -r '.tool_input.new_string // .tool_input.content // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$CONTENT" ] && exit 0
|
|
3
4
|
COMMAND=$(cat | jq -r ".tool_input.command // empty" 2>/dev/null); echo "$COMMAND" | grep -qE "git\s+commit" && [ ! -f "README.md" ] && echo "NOTE: No README.md in project" >&2
|
package/examples/skill-gate.sh
CHANGED
package/examples/usage-warn.sh
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/bin/bash
|
|
1
2
|
COMMAND=$(cat | jq -r '.tool_input.command // empty' 2>/dev/null)
|
|
2
3
|
[ -z "$COMMAND" ] && exit 0
|
|
3
4
|
echo "$COMMAND" | grep -qE "^\s*git\s+commit" || exit 0; S=$(git diff --cached --name-only 2>/dev/null | grep -cvE "test|spec" || echo 0); T=$(git diff --cached --name-only 2>/dev/null | grep -cE "test|spec" || echo 0); [ "$S" -gt 5 ] && [ "$T" -eq 0 ] && echo "WARNING: $S source files, 0 test files" >&2
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-safe-setup",
|
|
3
|
-
"version": "28.4.
|
|
4
|
-
"description": "One command to make Claude Code safe. 336 hooks (8 built-in + 330 examples). 49 CLI commands.
|
|
3
|
+
"version": "28.4.9",
|
|
4
|
+
"description": "One command to make Claude Code safe. 336 hooks (8 built-in + 330 examples). 49 CLI commands. 988 tests. 5 languages.",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"bin": {
|
|
7
7
|
"cc-safe-setup": "index.mjs"
|