KeiSeiKit-1.0/tests/fixtures/gdrive_import/mock-gitleaks
Parfii-bot 0be354a920 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

26 lines
679 B
Bash
Executable file

#!/usr/bin/env bash
# mock-gitleaks — PATH-override stub for kei-gdrive-import integration tests.
# Mimics `gitleaks dir <path>`: exits 1 if any file under <path> matches the
# AWS-shaped key pattern AKIA[A-Z0-9]{16}; exits 0 otherwise. Other args ignored.
set -u
DIR=""
for arg in "$@"; do
case "$arg" in
dir) ;;
--no-banner|--redact|--*) ;;
*) [ -z "$DIR" ] && DIR="$arg" ;;
esac
done
if [ -z "$DIR" ] || [ ! -d "$DIR" ]; then
exit 0
fi
# AWS access-key shape: literal "AKIA" + 16 uppercase-alnum chars.
if grep -REqI 'AKIA[A-Z0-9]{16}' "$DIR" 2>/dev/null; then
echo "mock-gitleaks: leak detected in $DIR" >&2
exit 1
fi
exit 0