You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair precise security finding ranges
You are working in /app/vendor/bandit, a small frozen source tree from the
Bandit static analyzer. A regression currently causes findings produced by a
file-level security check to lose the source range they computed. This is
especially dangerous for Trojan Source detection: a report must identify the
actual decoded source line containing the bidirectional control character, not
the surrounding raw context.
Repair the existing Bandit modules, rather than replacing the scanner with a
new standalone implementation. Your changes must preserve all of the
following:
The file-level Trojan Source check remains enabled and reports a B613 issue
for the first suspicious bidirectional control character.
Its one-based line_number, one-based col_offset, and exact one-line
line_range survive the shared tester/result-normalization path.
Ordinary AST checks that do not provide a range continue to receive the raw
context range.
Existing # nosec filtering and source-encoding detection continue to
work.
Run the real scanner workflow using the supplied fixture and write
/app/output.json with this exact top-level contract:
The report may contain the other fields emitted by Bandit, but it must be
valid JSON, have no scan errors, and include the B613 result for the supplied
fixture. Use the repository's existing modules and run_scan.py; do not use
the network or install dependencies.