feat: show dynamic analysis results in the view command - #32
Merged
Conversation
Extend 'view <sha256>' with a Dynamic Analysis section sourced from the
behavior_reports summaries on the file document and the public
/v1/behaviors/{id}/ endpoints:
- run status, sandbox environment, timings and failure details
- evidence summary and activity counts (sys-events via pagination probes)
- capabilities grouped by severity, deduplicated
- nested process tree with per-process detections
- one-line listing of other runs, selectable via --behavior-id
Replace the stale File.BehaviorReportID field with default_behavior_id
and the behavior_reports map, matching the current API schema. Detail
requests always use ?fields= projection to avoid inlining the full API
trace, fan out concurrently, and degrade gracefully when sub-documents
or counts are unavailable.
Open the Dynamic Analysis section with a table of every run — status, OS, time, duration, rule/artifact/screenshot counts and failure class — marking the run rendered in detail below with a selector arrow, so users can pick a specific report to display via --behavior-id. Drop the fields from the detail block that the table now covers.
The sandbox pipeline resolves the requested OS into a digest-bound guest profile and does not always echo the os field back into the behavior scan config, leaving the OS column empty. Show the profile ID instead, which identifies the guest more precisely.
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.
Summary
Extends
view <sha256>with a Dynamic Analysis section sourced from thebehavior_reportssummaries on the file document and the public/v1/behaviors/{id}/endpoints:▸marker on the run rendered in detailper_page=1pagination probes)--behavior-id/-bflag to display a specific run; auto-selection mirrors the web-ui (default report if completed, else newest completed)Supporting changes:
File.BehaviorReportIDfield withdefault_behavior_id+ thebehavior_reportssummary map, matching the current API schemaGetBehaviorReport(always uses?fields=projection — the unfiltered doc inlines the entire API trace) andCountSysEventswebapi methods, fanned out concurrentlyenvis guaranteed on the doc, whilecapabilities/proc_treeareomitemptyand a projection on a missing field fails the whole lookup — so they are fetched individually and tolerantly, degrading gracefully instead of aborting the reportosback into the behavior scan configTest plan
n/apaths--behavior-iderror, and fully populated reports (three sandbox runs of a GandCrab sample)go build,go vet,go test ./...all pass