Spaces:
Sleeping
Sleeping
File size: 2,776 Bytes
7a5c442 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # Security policy
## Reporting
If you discover a security issue in `icat_app`, do not file a public GitHub issue. Email `matussek@decodemarketing.com` with a description and reproduction steps. Acknowledgement within 5 business days.
## Secrets in this repo
The only secret used by `icat_app` is `HF_TOKEN`, stored as a GitHub Actions secret on `implicitdiagnosticsandsolutions/icat_app`. It is consumed by `.github/workflows/main.yml` to push the working tree to `https://huggingface.co/spaces/DecodeMarketing/decode_tools` on every push to `main`.
`HF_TOKEN` is a write token. It must:
- never be printed in workflow logs (workflow uses URL-embedded form; do not `echo` or `cat` it)
- never be committed to the repo
- never be reused as a personal access token
- be rotated if the workflow file is forked or the repo visibility changes
A second optional secret, `INCIDENT_LOG_TOKEN`, is consumed by `.github/workflows/gate.yml` to file CI-failure incidents into the `decode-claude-wiki` repo. If not set, incident filing is skipped (the gate still passes/fails on its own terms).
## What is enforced in code
- Writes to `.env*`, `credentials*`, `*.pem`, `*.key`, and similar secret file patterns are blocked by `.claude/hooks/block-env-writes.sh` at the Claude Code tool layer.
- Destructive git operations are blocked by `.claude/hooks/block-dangerous-git.sh`.
- Commits touching source files require a fresh `.decode-reviewer-clean` marker (enforced by `.githooks/commit-msg`), or an explicit `[override-reviewer: <reason>]` in the commit message (visible forever in `git log --grep="override-reviewer"`).
## Deploy boundary
Push to `main` = production deploy to a publicly reachable Hugging Face Space. See `docs/guides/protected-boundary-policy.md` for the full policy, including emergency-hotfix rules and the deploy-continuity check expected after merge.
## What is NOT a secret in this repo
The Streamlit app accepts user file uploads (Excel, ZIPs, images) at runtime. Those uploads are processed in-memory or in temp directories on the HF Space and are not persisted to the repo. No environment variables are required to run the app locally (`pip install -r requirements.txt && streamlit run app.py` is sufficient). There is no `.env` file; do not introduce one without updating this document and `docs/guides/protected-boundary-policy.md`.
## Supply chain
Dependencies are listed in `requirements.txt`. Mixed pinning today (`streamlit==1.32.2`, `reportlab==4.0.4`, `opencv-python-headless==4.9.0.80` are pinned; `Pillow`, `pandas`, `numpy`, `openpyxl`, `xlrd` are floating or lower-bounded). A lockfile is planned for slice 2 of the AI-standards remediation. Until then, treat the HF Space build as the source of truth for what is actually deployed.
|