Evidence, not findings
Cortex Agent does not add findings to a review. It adds evidence, and the review’s verdict is still arithmetic over the findings that survived the second pass. See How a review works. It also answers a different question from your CI. CI already tells you whether this repository’s tests still pass on this commit. The useful question a reviewer has is narrower: does the specific defect somebody suspects actually happen. Cortex Agent replaced an earlier stage that ran the repository’s own test command, because that stage was answering the question CI had already answered. Evidence comes in two kinds, and the split is not the agent’s opinion about its own work.
Which one a step becomes is decided by the exit code of the program the agent wrote, never by what the agent says about it afterwards. It is told to exit
9 when the defect happens and zero when it does not, so a model that would like to report a bug cannot do it by writing a more confident sentence. The run page prints exit {code} beside every step.
What a run needs
Two separate things have to be true.- The policy switch Let Cortex Agent run the change in an isolated runtime has to be on. It is on by default. See Review policy.
- The deployment has to have an isolated runtime for it to use. The hint under the switch is exact: Needs an isolated runtime on this deployment. Without one the run is recorded as unavailable, which is never a pass.
Read a run
1
Start from the pull request
Open the review in the app. Its CORTEX AGENT section reads either Evidence collected or Nothing was run, with counts beside it for bugs, explorations and artifacts.
2
Open the run
Choose View all artifacts. That opens the run page, headed Cortex Agent, with Open the pull request to get back to GitHub and Back to Cortex Security to return to the review inbox.
3
Read what it did
What Cortex Agent did lists each step in order, labelled Bug or Exploration, with its
exit {code}. An exit of 9 is a reproduced defect. Anything else is an exploration, whatever the step was trying to show.4
Open an artifact
Artifacts lists the files the run kept. Selecting one shows its media type, its
SHA-256 {hash} and its contents, with Copy to take the text away.Artifacts
Anything a program the agent wrote leaves in the run’s artifacts directory is lifted out of the log and kept with a name, a media type, a size, a checksum and a one-clause description of what it is. Path separators are stripped from the name, so an artifact cannot pretend to be a path. Artifacts are always shown as text, whatever their media type says, and they are served as data rather than as their own type. That is deliberate: an artifact is output from a program a model wrote, and nothing a browser would execute should be handed to you as something to execute. The media type is read from a fixed list rather than guessed at. Three messages you may meet in the viewer:When nothing was run
A run page headed Nothing was run always says why, in one of four sentences.
Every one of them is followed by the same line: A run that could not happen is never a pass, and nothing here counts towards the review’s verdict. There is also a shorter version of the same idea for a run that simply had no work: Cortex Agent checked this change out and found nothing a program could demonstrate.
Run statuses
An unavailable run cannot claim a bug, an exploration or an artifact, and it cannot exist without a reason attached. That is enforced in storage rather than by convention, so there is no path by which an empty run becomes a quiet success.
Who can see a run
A run page is signed in, and only the account that owns the review can open it. A run belonging to another account is reported as not found rather than as forbidden, so the page cannot be used to work out whether a run id is real. Every account sees only its own reviews.Related
- How a review works - the stages a review moves through, and where a run fits.
- Review policy - the switch that allows a run, and everything else a review consults.
- Checks and comments - the summary comment, including the line that appears when code was run.
- Repository scans - the other way Cortex Security looks at a repository.
- Security troubleshooting - when a run reads Nothing was run and you expected otherwise.