Harden per security re-scan + test-suite adequacy plans - #6
Open
Schroedingberg wants to merge 8 commits into
Open
Harden per security re-scan + test-suite adequacy plans#6Schroedingberg wants to merge 8 commits into
Schroedingberg wants to merge 8 commits into
Conversation
are's failure output substitutes the failing row into the template, which beats doseq + (is ... (pr-str x)) labels. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…closed Effect schema, category sanitization, check cmd M4/L1/L4/L6 from the 2026-07-11 security re-scan; P2/P4/P5/P6(app)/P7 from the test-suite adequacy analysis. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ger.main + image smoke test M2/M3(sign)/L5 from the security re-scan; P1/P3 from the test adequacy analysis. deploy.yml PR runs are now secret-free (fmt+validate only). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ontainer, metadata firewall, pinned host keys M1/M3(verify)/L2/L3 from the security re-scan; P6 from the test adequacy analysis. New bbledger-firewall.service blocks containers from 169.254.169.254 and orders the bot after it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…m hledger The bot only ever needed infer-balances, apply-auto and account-sums; render/rows/rollups, balance-sheet, income-statement, ledger.cli and the unused core/balances replicated a tool that is already the conformance oracle. The ledger file stays hledger-compatible, so `hledger -f ... bal --auto` replaces `bb ledger`. Also drops the now-meaningless CLI-vs-hledger benchmark and the babashka/cli dep on both runtimes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ract 289 lines of frozen prose duplicated what the malli schemas (Expense, Config, Effect) and docstrings already enforce, and could silently drift. The one non-executable piece worth keeping — the parsed txn/posting/rule data shapes — moves into the ledger.parse ns docstring, where the shapes are produced. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The STATE_* / S3-backend path was never activated: one disposable VM whose real state lives in the data repo doesn't need tfstate diffs. Removes the backend.tf generation, the HAS_STATE conditionals and the AWS_* env from every step; destroy is fully handled by the wipe step. The STATE_* repo secrets are dead and can be deleted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements both plan documents (
.claude/security-rescan-2026-07-11.md,.claude/test-suite-adequacy-2026-07-12.md): all Medium/Low security findings (M1–M4, L1–L6) and all test-gap items (P1–P7).App layer (
2424a54):replymay now be a string or seq of strings (CONTRACT.md amended minimally).append!actually failed; a confirmation-send failure after a successful commit logs instead of lying.run-effects!branches wrapped; failures log to stderr, never escape into the polling loop, and the outermost handler never callssend!.Expenseschema constrains category segments (12,30 x #Evil;Catnow rejected with ⚠).Effectschema (P2): the next:replly-style typo throws instead of silently no-oping; injected-fns map asserted complete.clojure -M:bot check(P6): config + getMe health probe, exit 0/1 — verified against the live Telegram API (401 with a fake token → exit 1).handle-update.CI (
6d4c0b7)# vX.Y.Zcomments kept).tofu fmt/validateonly; plan/apply/destroy are dispatch-only).clojure -M -e "(require 'ledger.main)"step (a typo'd require no longer sails into a production crash loop) and a native-arch image smoke test before the multi-arch push (gha layer cache makes the push build nearly free).Infra/deploy (
27ae182)bbledger-firewall.service(idempotentiptables -I DOCKER-USER -d 169.254.169.254 -j DROP, reboot-persistent, bot ordered after it).cosign verify(repo-workflow identity, GitHub OIDC issuer) → one-shotclojure -M:bot checkagainst the real/data:ro→ only then restart. Any failure leaves the old bot running; the timer retries. cosign v3.1.1 installed via cloud-init with per-arch sha256 verification (checksums confirmed against real downloads).USER bbledger(fixed uid 1000),--cap-drop=ALL --security-opt=no-new-privilegeson every docker-run site; cloud-init chowns/srv/bbledger/datato uid 1000 and the host push unit getssafe.directory. Verified empirically: image built and run hardened as uid 1000 with a host-owned mount — git commit and classpath both work.ssh-keyscanTOFU replaced with the three keys fromapi.github.com/meta(fetched 2026-07-12).Verification
bb testandclojure -M:testover the combined diff: 60 tests, 204 assertions, 0 failures each (dual-runtime parity holds); lint clean; hledger conformance ran.templatefile()/indent()rendering; all units round-trip byte-identical (verbatim-injection invariant preserved).systemd-analyze verifyclean. Autodeploy ExecStart de-escaped and passedsh -n.tofu validatecould not run (tofu not installed locally); the main.tf change is one templatefile entry mirroring the existing seven — the deploy.yml PR check will validate it.Notes for review
e1d9efc(theclojure.test/arerefactor fromtest-are) — the new tests build on it.:latestunverified (the cosign gate covers autodeploy only), and cosign v2-signs / v3-verifies — believed compatible (classic format), but unprovable until the first real CI run signs an image..claude/are untracked and left that way.🤖 Generated with Claude Code