runinpty.py
triggers CrowdStrike security alerts on MacOS #480
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#480
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
A recent change to remove a dependency on
expect(1)
added a Python script that seems to trigger CrowdStrike security checks when it runs. As a result I've had to revert to CppNix on my work MacOS machine.This is mostly an FYI since I'm not sure how you'd fix it (aside from reverting), or if you want to.
Here's a redacted version of the report I received:
Steps To Reproduce
Not sure how you'd test this without a system running CrowdStrike, so this is more of an FYI
Expected behavior
Ideally Nix/Lix shouldn't trigger security alerts.
nix --version
outputPlease get your corporate security team to hold CrowdStrike's feet to the fire on this one. The code in that script is copy pasted from the Python standard library and lightly modified, and does not perform any network access (although hm, I wonder if the Nix offline detection inside or something is what triggered their EDR by looking like network access).
It is impossible to test the code path in
nix flake show
without running an instance of Bash with a pseudoterminal attached, as it tests terminal size (you can see that from the stty command included in there), so we cannot remove it.If you do feel like causing them an alert with just corporate-approved(tm) software literally included in macOS, try
script -q /dev/null sh -c 'stty cols 0; nix flake show github:lix-project/lix'
.I don't know what to say, this is just your corporate security software breaking legitimate use cases. We would love to not need that python script, but if you read its sources, it exists because
script(1)
has inconsistent command line arguments across systems, and so it is most reasonable to write a custom wrapper.If it is absolutely unacceptable that your system runs this code, consider writing a Nix overlay something like:
final: prev: { lix = prev.lix.overrideAttrs { doInstallCheck = false; }; }
and including it after the lix-overlay in your configuration. That would disable the testsuite that contains this code.Thanks for the reply. Yeah it's not an ideal situation, and I didn't expect y'all to try to fix it. It's corporate BS that is causing the problem here.
Like I said, I opened this more as an FYI, and for anyone else who runs into this to find.
I have given a workaround to stop Lix triggering it, but I would honestly recommend writing a strongly worded reply to your corporate security department that the alert is illegitimate and that you'll continue causing similar ones until they fix their EDR.
You can of course also use binary versions of Lix from nixpkgs, which will not have this problem.