| name | stigix-secret-guard |
| description | Pre-push security checklist to prevent leaking Palo Alto SASE credentials and other secrets into the Stigix GitHub repository. Use this skill BEFORE any git commit or push, and whenever modifying files that could contain credentials (.env, credentials.json, *.old, *.bak, etc.)
|
Stigix Secret Guard Skill
Use this skill before every git commit or git push that touches configuration files,
environment files, or any file outside of src/, mcp-server/src/, or web-dashboard/src/.
โ ๏ธ Known Leak Patterns for Stigix
The following patterns indicate real Palo Alto SASE credentials and must NEVER be committed:
Pattern 1 โ Palo Alto Service Account ID
*@*.iam.panserviceaccount.com
Example: PrismaSASE@1927975026.iam.panserviceaccount.com
Pattern 2 โ Palo Alto Client Secret (UUID format)
PRISMA_SDWAN_CLIENT_SECRET="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
A UUID-format value next to any of: CLIENT_SECRET, client_secret, PRISMA_SDWAN_CLIENT_SECRET
Pattern 3 โ TSG ID (numeric Prisma tenant ID)
PRISMA_SDWAN_TSGID=<10-digit number>
Example: PRISMA_SDWAN_TSGID=1927975026
Pattern 4 โ credentials.json / .old files with real values
Any credentials.json, credentials.json.old, .env, .env.* containing real values instead of placeholders.
Step 1 โ Pre-Commit Scan
Before git add or git commit, run:
git diff --cached | grep -E "panserviceaccount\.com|PRISMA_SDWAN_CLIENT_SECRET=\\\".{10,}\\\"|PRISMA_SDWAN_TSGID=[0-9]{7,}"
grep -r --include="*.json" --include="*.env" --include="*.old" --include="*.bak" --include="*.md" \
-E "panserviceaccount\.com|[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}" \
. 2>/dev/null | grep -v ".gitignore\|node_modules\|your-client\|placeholder\|example"
If any match โ STOP. Do not commit.
Step 2 โ Verify .gitignore Coverage
The following patterns MUST be in .gitignore:
# Credentials
credentials.json
**/credentials.json
secrets.json
**/secrets.json
*.pem
*.key
# Environment files
.env
.env.*
.env.local
.env.prod
.env.production
# Roadmap / notes (may contain real values)
Roadmap/
roadmap/
Check with:
git check-ignore -v engines/credentials.json
git check-ignore -v web-dashboard/.env
Both must return a match. If not โ add to .gitignore immediately.
Step 3 โ Check Tracked Files
git ls-files | grep -E "\.env|credentials|\.old|\.bak|secrets"
Any match โ inspect the file content and remove if it contains real values:
git rm --cached <file>
git commit -m "chore: remove sensitive file from tracking"
Step 4 โ Scan Git History (if leak suspected)
git log --all --full-history -S "panserviceaccount.com" --oneline
git log --all --full-history -S "CLIENT_SECRET" --oneline
If any commit found โ the secret is in the public history. You MUST:
- Immediately revoke the service account on apps.paloaltonetworks.com
- Create a new service account with a new secret
- Consider rewriting git history with
git filter-repo (advanced โ only if repo is private or just before going public)
Step 5 โ Revocation Procedure (if leaked)
- Go to apps.paloaltonetworks.com
- Navigate to Identity & Access โ Service Accounts
- Find the account matching the leaked
client_id (e.g., PrismaSASE@<TSGID>.iam.panserviceaccount.com)
- Delete or rotate the client secret โ this immediately invalidates any exposure
- Create a new service account
- Update only local files:
.env, credentials.json (gitignored)
Files That Are Safe vs. Dangerous
| File | Safe? | Rule |
|---|
engines/credentials.json | โ
Local only | Gitignored via **/credentials.json |
web-dashboard/.env | โ
Local only | Gitignored via .env |
Roadmap/*.md | โ
Local only | Gitignored via Roadmap/ |
engines/credentials.json.old | ๐ด DANGER | .old files NOT gitignored by default |
*.env.backup | ๐ด DANGER | Backups may escape gitignore rules |
Scripts/getflow.py | โ
Safe | Contains only placeholders |
docs/*.md | โ
Safe | Contains only example values |
README.md | โ
Safe | Contains only your-client-secret |
[!CAUTION]
.old, .bak, .backup files are the most common leak vector โ they often contain
real values copied from active config files and are NOT always gitignored.
Always check before committing files with these extensions.
Quick Pre-Push Checklist
Before any git push: