Repository navigation
audit reads a last line without a newline; shared helpers; version ranges stated once - #504
Merged
Merged
Conversation
… helpers; version ranges stated once (fixes #502) - tracekit audit dropped a finished transcript's last line when it had no newline (hook.transcript_entries stops before an unterminated line, for tailing): it now passes final=True, so the line is read, or counted as malformed. - audit's --since uses report.when, which now takes minutes (30m) too; its safe open uses graph._open_regular, split out of _secure_source. - A hand-wired integration's version check takes only its pip requirement; the range comes from it (autowire._tested). A test checks instrument()'s FRAMEWORKS tuples against their requirement strings. The five VersionCheck test classes share one mixin. - docs/limits.md: rows for a decision's unenforced expires_at, and a pre-1.4 verifier reading a bundle whose verifier_min_version was edited down.
…closes its fd if fstat fails; a direct when() test; the decision-expiry row links the lifecycle page
8 of 11 tasks
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.
What and why
Fixes #502. Each change below fixes something found in the 2 November review of merged outside contributions.
tracekit auditdropped a finished transcript's last line when it had no newline, reporting 0 calls and 0 malformed lines.hook.transcript_entriesstops before an unterminated line, which is right when tailing a live file. It now takesfinal=True, so audit reads that line, or counts it as malformed if it's cut off.audit's--sinceusesreport.when, which now also takes minutes (30m). Its safe open usesgraph._open_regular, split out of_secure_source.autowire._tested).instrument()'sFRAMEWORKStuples match their requirement strings.VersionCheckclasses share one mixin (tests/factories.py).expires_atis signed but not enforced; and a verifier older than 1.4 reading a bundle whoseverifier_min_versionwas edited down skips signed findings.How I ran it as a user
tracekit auditon a made-up folder whose last line has no newline. Before: 0 calls. After: the call is decided (deny). With a cut-off last line, it's counted as malformed.Checklist
make lint build testpass: 4,031 passed before the last fix; the 7 failures were intests/test_version_check.py(the old signature), now fixed and passing.make test-tsis running.--since 30m)Security invariants
Evidence format