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 searching /dev/disk/by-id aliases. #4795

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

preslavgerchev
Copy link
Contributor

@preslavgerchev preslavgerchev commented Oct 30, 2024

This fixes the GCP snapshot scanning. In GCP devices are aliased under /dev/disk-by-id/<device-name>. This PR builds on top of the already supported alias finding by looking into that directory as well

Copy link
Contributor

github-actions bot commented Oct 30, 2024

Test Results

3 129 tests   3 128 ✅  1m 22s ⏱️
  371 suites      1 💤
   28 files        0 ❌

Results for commit b0a6ad0.

♻️ This comment has been updated with latest results.

@slntopp
Copy link
Member

slntopp commented Oct 31, 2024

I think it would've made more sense to just search in multiple paths instead of copying the method, since the logic is the same

  1. Look for symlinks in the dir
  2. Trim to base name
  3. Look for matches

@preslavgerchev preslavgerchev force-pushed the preslav/fix-gcp-snapshot branch from 53c0695 to 5a74832 Compare November 1, 2024 10:03
Signed-off-by: Preslav <preslav@mondoo.com>
@preslavgerchev preslavgerchev force-pushed the preslav/fix-gcp-snapshot branch from 5a74832 to b0a6ad0 Compare November 1, 2024 10:06
@preslavgerchev preslavgerchev merged commit 9f6c79d into main Nov 1, 2024
15 checks passed
@preslavgerchev preslavgerchev deleted the preslav/fix-gcp-snapshot branch November 1, 2024 10:12
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants