Work in progress: Bash output ceiling and refusing Reads of session transcripts
This commit is contained in:
@@ -61,6 +61,7 @@ from rule_hook.round_report import round_report_breaches
|
||||
from command_lines.shell_command import simple_commands
|
||||
from project_config import templates
|
||||
from rule_hook.todo_check import todo_breaches
|
||||
from rule_hook.transcript_read import transcript_breaches
|
||||
|
||||
|
||||
def main(argv: list[str], stdin: str) -> int:
|
||||
@@ -96,7 +97,7 @@ def breaches_of(call: Call, home: str, environ: typing.Mapping[str, str]) -> tup
|
||||
command = text(call.given, "command")
|
||||
return command, command.split("\n", 1)[0], bash_breaches(command, call.cwd, home) + read_breaches(call, home) + env_file_breaches(call, home)
|
||||
if call.tool == "Read":
|
||||
return "", text(call.given, "file_path"), read_breaches(call, home) + env_file_breaches(call, home)
|
||||
return "", text(call.given, "file_path"), read_breaches(call, home) + env_file_breaches(call, home) + transcript_breaches(call, home)
|
||||
if call.tool == "Grep":
|
||||
# Only env-file-read checks a Grep, and it takes no override, so no marker or log line concerns the call.
|
||||
return "", "", env_file_breaches(call, home)
|
||||
|
||||
Reference in New Issue
Block a user