Repository navigation
docs: correct the file_access and callable-allowlist claims (take 2) - #14
Merged
Merged
Conversation
PR #13 got these wrong, and its own measurement method was at fault. Re-ran every case against the installed 0.0.6 wheel from outside the repository, with a counting host function, so 'was it called' is measured rather than inferred: sorted([2,1], key=f), f unallowlisted -> 0.0.6 returned [2, 1], host_calls=0 max([2,1], key=f) -> 0.0.6 returned 2, host_calls=0 iter(f, None) -> 0.0.6 timed out, host_calls=0 So 0.0.6 never invoked these callbacks. PR #13 claimed it did; that came from a marker file written by the *0.0.7* run, because the probe executed from the repository root where 'import codesafe' resolves to the local tree. Same class of mistake as the one #13 was meant to fix. Corrected: - Callables via builtins: 0.0.6 already refused these paths. 0.0.7's allowlist rule is defence in depth, not a fix. Reclassified. - file_access: measured again and PR #13 was wrong in the other direction. With open in allowed_builtins AND in allowed_function_calls, 0.0.6 did create the file despite file_access=False. So this IS a real fix (misconfiguration- dependent, not a sandbox escape). Restored to Security Fix with the precondition stated. - Rebinding: unchanged from #13 - 0.0.6 rejected all shapes, defence in depth. Docs only; 114 tests unaffected. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.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.
PR #13 got these wrong, and its measurement method was the reason. Re-ran every case against the installed 0.0.6 wheel from outside the repository with a counting host function, so "was it called" is measured rather than inferred:
fNOT allowlisted)host_callssorted([2,1], key=f)[2, 1]max([2,1], key=f)2list(iter(f, None))EvaluationTimeoutErrorSo 0.0.6 never invoked these callbacks. #13 claimed it did — that "host RAN: True" came from a marker written by the 0.0.7 run, because the probe executed from the repository root where
import codesaferesolves to the local tree. Same class of mistake #13 was supposed to fix.Corrections
Callables via builtins → defence in depth. 0.0.6 already refused these paths. 0.0.7's allowlist rule makes the policy explicit; it closes no hole. Reclassified.
file_access=False→ Security Fix restored. #13 was wrong in the other direction. Measured again:openviaallowed_builtinsonlyUnsafeExpressionError+ allowed_function_calls=['open']RuntimeErrorSo the flag genuinely was not honoured when the host granted both. Misconfiguration-dependent rather than a sandbox escape, but real — restored to Security Fix with that precondition stated.
Rebinding → unchanged from #13: 0.0.6 rejected all shapes, defence in depth.
Docs only; 114 tests unaffected.