Closed egibs closed 2 months ago
I can work on appending the file name to the original path.
Edit: Added in 2b61953
(#180).
Improved the diff output in 0a275a7
(#180). It would be nice to store both original paths, though. 🤔
❯ go run . --diff ~/Downloads/apko_tar_gzs/apko_0.13.2_darwin_amd64.tar.gz ~/Downloads/apko_tar_gzs_2/apko_0.13.2_darwin_arm64.tar.gz
Moved: ../../../../../var/folders/3g/88131l9j11x995ppjbxsvhbh0000gn/T/apko_0.13.2_darwin_amd64.tar.gz2511095900/apko_0.13.2_darwin_amd64/apko -> ../../../../../var/folders/3g/88131l9j11x995ppjbxsvhbh0000gn/T/apko_0.13.2_darwin_arm64.tar.gz178042758/apko_0.13.2_darwin_arm64/apko (score: 0.941791)
Original Path: /Users/egibs/Downloads/apko_tar_gzs_2/apko_0.13.2_darwin_arm64.tar.gz > apko
+++ ADDED: 3 behavior(s) +++
------------------------------------------------------------------------------
RISK KEY DESCRIPTION EVIDENCE
------------------------------------------------------------------------------
+LOW process/chdir changes working directory cd H2l
+MED net/bpf BPF (Berkeley Packet Filter) bpf
+MED security_controls/linux/ufw interacts with the ufw firewall ufw
------------------------------------------------------------------------------
Edit: even better output added in 532088f
(#180) (full Markdown rendered as a showcase):
RISK | KEY | DESCRIPTION | EVIDENCE |
---|---|---|---|
+MEDIUM | net/bpf | BPF (Berkeley Packet Filter) | bpf |
+MEDIUM | security_controls/linux/ufw | interacts with the ufw firewall | ufw |
+LOW | process/chdir | changes working directory | cd H2l |
I'm going to sit on this and ideate a bit more.
Closes: https://github.com/chainguard-dev/bincapz/issues/178
When scanning archives, we only showed the temporary directory used to hold and extract the archive. This PR preserves the originally-provided path and displays it when scanning archives.
This change applies to both normal scans as well as diffs (output provided in the comments below).
Examples --
Terminal:
Markdown (screenshot of the headers for brevity):![CleanShot 2024-05-02 at 19 33 33@2x](https://github.com/chainguard-dev/bincapz/assets/20933572/0e5f3199-a37a-4df6-8f20-7364b8ce6b4e)