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

hercules-ci-agent: fix crash calling security #955

Merged
merged 1 commit into from
May 21, 2024

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented May 21, 2024

hercules ci agent has the same problem as was reported in #924.

I had originally fixed this downstream in nix-community by wrapping /usr/bin/security (nix-community/infra@5da85a9) but here I've reused the same fix that was used for cachix agent.

cc @roberth

this applies the same fix that was used for the cachix agent in e043606
@roberth
Copy link
Contributor

roberth commented May 21, 2024

Calling security sounds alarming. More seriously though, do you know why it's called? I don't see an explicit call to it, neither from the Nix code base, nor hercules-ci-agent. I suspected it might be called by sandbox-exec, which would explain why I haven't seen this before, assuming most installations have been multi-user so far. I suppose then cachix-agent would only fail if it had to fall back to building something.

Regardless, this fix looks alright to me, and I'd be happy to upstream it into the agent repo as well.

@zowoq
Copy link
Contributor Author

zowoq commented May 21, 2024

More seriously though, do you know why it's called? I don't see an explicit call to it, neither from the Nix code base, nor hercules-ci-agent.

I looked as well at first and also couldn't find it, AFAIK it is in one of the haskell libs. #924 (comment)

First noticed this problem after this haskell updates merge with the ghc 9.4 -> 9.6 bump. NixOS/nixpkgs#279413

Also seems to be causing problems for other haskell packages. NixOS/nixpkgs#297775

Copy link
Collaborator

@Enzime Enzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for the contribution

@Enzime Enzime merged commit eac4f25 into LnL7:master May 21, 2024
6 checks passed
@zowoq zowoq deleted the hercules-security branch May 21, 2024 22:28
@sandydoo
Copy link
Contributor

sandydoo commented May 27, 2024

I looked as well at first and also couldn't find it, AFAIK it is in one of the haskell libs. #924 (comment)

At least for cachix, I think it's coming from here: https://github.com/kazu-yamamoto/crypton-certificate/blob/a91c3f4bd8ccbbb0568f41e185a0329855a05b90/x509-system/System/X509/MacOS.hs#L22

There's an open issue for this: kazu-yamamoto/crypton-certificate#9

roberth added a commit to hercules-ci/hercules-ci-agent that referenced this pull request Jun 11, 2024
LnL7/nix-darwin#955

Co-authored-by: zowoq <59103226+zowoq@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants