Commit 8286b05
committed
fix(security): address Copilot/coderabbit review on PR #140
- src/ledgerbase/__init__.py: read LEDGERBASE_ENV in addition to the
Flask 3.x-deprecated FLASK_ENV when selecting prod vs dev, and
document the choice. Avoids silently treating a misconfigured
production deploy as dev when only one of the variables is set.
- src/ledgerbase/config.py: drop the dead ProductionConfig.__init__
(Flask's from_object does not instantiate). Move the check into a
module-level validate_production_env() and call it from get_config()
so the fail-fast actually runs.
- All workflows: re-pin step-security/harden-runner from v2.10.1
(which was a downgrade from the prior v2.12 reference) to v2.12.0
(SHA 0634a2670c59f64b4a01f0f96f84700a4088b9f0).
- .github/workflows/cifuzzy.yml: correct the inline note so it
reflects the actual egress-policy (audit) and points at the
follow-up to tighten to block.
- SECURITY-FINDINGS.md: update SHA table to v2.12.0; add `bash`
language tag on the fenced grep example (markdownlint MD040).
Skipped — pre-existing issues on `main`, not regressions from this PR
and outside the audit scope:
- .github/workflows/security-bandit.yml step mixing `run:` and `uses:`.
- .github/workflows/templates/test-matrix.yml coverage.xml not passed
between jobs.
- Code Quality format failures in 7 unrelated repo-root files
(docs/source/conf.py, load_env.py, noxfile.py, scripts/*.py,
vulture_whitelist.py) — already failing on `main` before this PR.
- FIPS Compliance / CodeQL / Python Compat / submit-pypi job-level
failures: workflows expect uv.lock which the repo doesn't have
(only poetry.lock). Pre-existing infrastructure mismatch.1 parent a4c5714 commit 8286b05
35 files changed
Lines changed: 75 additions & 52 deletions
File tree
- .github/workflows
- templates
- src/ledgerbase
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments