fix: properly flag if running on Linux or Mac OSs#2051
Conversation
| case "linux": | ||
| return plugin.OSLinux | ||
| default: | ||
| return plugin.OSAny |
There was a problem hiding this comment.
I'm pretty sure its safe to return this rather than error, though (assuming we don't actually want to error) it could be nice if scalibr had a plugin.OSUnknown either as a new value or an alias for this one, since that's what we want to represent here
There was a problem hiding this comment.
Hmm, can this log a warning that OS "xyz" is not officially supported.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2051 +/- ##
==========================================
- Coverage 66.09% 66.08% -0.01%
==========================================
Files 172 172
Lines 16214 16225 +11
==========================================
+ Hits 10716 10723 +7
- Misses 4848 4852 +4
Partials 650 650 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@another-rex I found this while trying to come up with tests for the detectors - afa06df shows that this is broken. I've opened this so I don't forget, but I think it's probably best if we first get the snapshot failures on #2021 sorted before we dig into everything else including this |
dfe2d55 to
f314ff9
Compare
|
Talked with other Scalibr folks, I think we're happy to add a OSUnknown in scalibr that just only matches OSAny. |
The
OSUnixvalue is only meant to be used by plugins to indicate they're fine working with either Linux or macOS, but the OS still needs to be one of those values when scanning.This is not an issue currently because we're just using extractors, but there are a few detectors that require a Unix-like OS