Ariel Miculas-Trif

Results 28 comments of Ariel Miculas-Trif

The problem is you cannot call `NormalizeBaseDirectory` on `/proc/117851/root/home/amiculas/ran`. ``` func NormalizeBaseDirectory(base string) (string, error) { if base == "" { return "", nil } cleanBase, err := filepath.EvalSymlinks(base) if...

> This last case is effectively the same issue you have, correct? If so, I think we could just fix the initial directory path lookup to honor the --base-path. Or...

This is an early POC for my feature request: https://github.com/anchore/syft/compare/main...ariel-miculas:syft:allow-scanning-files-in-mount-namespaces It allows me to do: ``` ❯ sudo env PATH=$PATH go run cmd/syft/main.go scan --base-path=/proc/240346/root file:/proc/240346/root/usr/local/bin/ran ✔ Indexed file system...

Let me step back and try to clarify the issues with syft: ### 1. Honour the `base-path` flag for file sources First of all, the `--base-path` flag doesn't work with...

Thanks for your input! 4a seems the most promising start, since the OS catalogers already have parts of their paths to common DB locations hard-coded. It would also nicely fit...

Well, I would have hoped that syft would do the distro identification for me, and also the package manager identification and the related databases. Otherwise, I end up duplicating the...

Yes, I've also noticed this problem and I thought the `--base-path` command line option of the `syft scan` command would solve this and work the way you've described "the root...

How do you feel about exposing a `NewFromUnindexedDirectory` function? ``` func NewFromUnindexedDirectory(dir string) file.WritableResolver { return NewFromUnindexedDirectoryFS(afero.NewOsFs(), dir, "") } ``` Then I could do: ``` fileResolver := syft.NewFromUnindexedDirectory(sourcePath) release...

Thanks for taking the time to respond. I think the issue happens for processes which have a lot of NUL bytes in `/proc/PID/environ`. For example, I have the following Chrome...

You are right, quoting from https://manpages.ubuntu.com/manpages/trusty/en/man5/proc.5.html > This file contains the environment for the process. The entries are separated by null bytes ('\0'), and there may be a null byte...