Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scanning files in mount namespaces #3423

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Nov 7, 2024

  1. Support scanning directories containing absolute symlinks in a chroot

    Although syft supports scanning an entire chroot, it couldn't scan paths
    inside the chroot containing absolute symlinks relative to the chroot
    base until now.
    
    This is the first step in supporting scanning files/directories in other
    mount namespaces, since a different mount namespace is similar to a
    chroot.
    
    The main change is the addition to EvalSymlinksRelativeToBase, which can
    resolve both regular symlinks and absolute symlinks confined in a
    chroot-like directory structure. This function returns a path that can
    be accessed in syft's scanning context, i.e. not meant to be used from
    within the chroot context.
    
    See anchore#3396 for further discussions.
    
    Signed-off-by: Ariel Miculas-Trif <[email protected]>
    ariel-miculas committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    69e74ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc72963 View commit details
    Browse the repository at this point in the history
  3. Support scanning paths in different mount namespaces via procfs

    Fixes anchore#3396
    
    Signed-off-by: Ariel Miculas-Trif <[email protected]>
    ariel-miculas committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    c5b9948 View commit details
    Browse the repository at this point in the history