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

Update with security advisories is failing since 2.6.0 with exit code 5 #11614

Closed
mvorisek opened this issue Sep 1, 2023 · 9 comments
Closed
Milestone

Comments

@mvorisek
Copy link
Contributor

mvorisek commented Sep 1, 2023

Composer version: 2.6.0

CI output: https://github.com/atk4/ui/actions/runs/6052592988/job/16426385347#step:7:331

What does exit code 5 mean?

Or is Found 9 security vulnerability advisories affecting 5 packages. info intended to return non-zero exit code?

@stof
Copy link
Contributor

stof commented Sep 1, 2023

@Seldaek it looks like the exit code 5 added for cases of using composer install --audit gets applied also to update or require without any opt-in (see the comment on #11362). This looks like a bad implementation of the feature in #11362 as it impacts a lot more things.

@mvorisek
Copy link
Contributor Author

mvorisek commented Sep 1, 2023

Yes, #11362 should be reverted. And as non-latest deps are more or less expected to contain vulnerabilities, non-zero exit code should be returned only when --audit is passed explicitly.

@Seldaek
Copy link
Member

Seldaek commented Sep 1, 2023

I think the intent was sensible but yeah probably it applies to too many things right now. I fixed one in require already yesterday but I guess this'll need more fine tuning

@stof
Copy link
Contributor

stof commented Sep 1, 2023

to me, composer update (and require and create-project similarly) should either run the auditor by default without failing or it should not run it by default. But changing the exit code without an opt-in looks wrong to me.
The PR implemented the exit code change any time the auditor was running, but only composer install has such an opt-in to run the auditor at all.

My own vote would even be to revert that. If a script wants to fail on audit failures, it would probably be a lot more understandable if this happens during composer audit

@mvorisek mvorisek changed the title Update with lowest is failing since 2.6.0 with exit code 5 Update with security vulnerability advisories is failing since 2.6.0 with exit code 5 Sep 1, 2023
@mvorisek mvorisek changed the title Update with security vulnerability advisories is failing since 2.6.0 with exit code 5 Update with security advisories is failing since 2.6.0 with exit code 5 Sep 1, 2023
@Seldaek
Copy link
Member

Seldaek commented Sep 3, 2023

Fixed by #11616

@Seldaek Seldaek closed this as completed Sep 3, 2023
@Seldaek Seldaek added this to the 2.6 milestone Sep 3, 2023
@mvorisek
Copy link
Contributor Author

mvorisek commented Sep 3, 2023

please tag a new release, it is failing a lot of our CIs like https://github.com/atk4/ui/actions/runs/6063294764

@Seldaek
Copy link
Member

Seldaek commented Sep 3, 2023

Yeah please chill out I am here on Sunday trying to fix things.

@Seldaek
Copy link
Member

Seldaek commented Sep 3, 2023

This kind of comment just makes me want to close the laptop and go enjoy something else seriously..

@dkarlovi
Copy link

dkarlovi commented Nov 2, 2023

@mvorisek why do you need a new release to be cut just for your builds to pass? You can always not use the latest Composer immediately.

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

No branches or pull requests

4 participants