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

Action "Auto-Update Linters" is failing #3619

Closed
muffl0n opened this issue Jun 6, 2024 · 19 comments
Closed

Action "Auto-Update Linters" is failing #3619

muffl0n opened this issue Jun 6, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@muffl0n
Copy link

muffl0n commented Jun 6, 2024

Describe the bug
Action "Auto-Update Linters" is failing with error

fatal: could not read Username for 'https://github.com/': No such device or address
Error: The process '/usr/bin/git' failed with exit code 128

https://github.com/oxsecurity/megalinter/actions/runs/9391727233/job/25864531487#step:11:37

I'm desperately waiting for a new release of Megalinter to include version 3.1.0 of v8r which includes proxy support. See: chris48s/v8r#442

Maybe the used token is expired? peter-evans/create-pull-request#2863

@muffl0n muffl0n added the bug Something isn't working label Jun 6, 2024
@echoix
Copy link
Collaborator

echoix commented Jun 6, 2024

@nvuillam Can you check that the tokens aren't expired? I see the last three runs failing for the same error, and I don't see a reason why.

@nvuillam
Copy link
Member

nvuillam commented Jun 6, 2024

PAT regenerated and env vars updated :)

@muffl0n
Copy link
Author

muffl0n commented Jun 6, 2024

Thank you very much! #3606 was just updated. 😻

@muffl0n muffl0n closed this as completed Jun 6, 2024
@echoix
Copy link
Collaborator

echoix commented Jun 6, 2024

If you want to help out to get that PR unblocked, you may want to investigate the trivy vulnerabilities that came out this week, if there's something in our control to do

@muffl0n
Copy link
Author

muffl0n commented Jun 6, 2024

I'd be happy to!

I already took a look at https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-29415 and the corresponding issue indutny/node-ip#150. But that seems to be a dead end cause the project is unmaintained.

Gonna take a deeper look at it tomorrow.

@muffl0n
Copy link
Author

muffl0n commented Jun 6, 2024

Just saw, @nvuillam already took care of that one. Thanks! 💗

@nvuillam
Copy link
Member

nvuillam commented Jun 6, 2024

:)

@echoix
Copy link
Collaborator

echoix commented Jun 6, 2024

Just saw, @nvuillam already took care of that one. Thanks! 💗

Saw it just after finishing writing. But it was the blocker for the week.

@muffl0n
Copy link
Author

muffl0n commented Jun 7, 2024

ip@2.0.0 is transitively pulled in by make-fetch-happen

├─┬ make-fetch-happen@13.0.0
│ ├─┬ @npmcli/agent@2.2.0
│ │ ├─┬ agent-base@7.1.0
│ │ │ └── debug@4.3.4 deduped
│ │ ├─┬ http-proxy-agent@7.0.0
│ │ │ ├── agent-base@7.1.0 deduped
│ │ │ └── debug@4.3.4 deduped
│ │ ├─┬ https-proxy-agent@7.0.2
│ │ │ ├── agent-base@7.1.0 deduped
│ │ │ └── debug@4.3.4 deduped
│ │ ├── lru-cache@10.1.0 deduped
│ │ └─┬ socks-proxy-agent@8.0.2
│ │   ├── agent-base@7.1.0 deduped
│ │   ├── debug@4.3.4 deduped
│ │   └─┬ socks@2.7.1
│ │     ├── ip@2.0.0

The newest version of socks switched from ip to ip-addressin JoshGlazebrook/socks#94 but proxy-agent did not pick up the new version yet: TooTallNate/proxy-agents#295

@echoix
Copy link
Collaborator

echoix commented Jun 7, 2024

So does it mean something else needs to be done, or it's ok now?

@muffl0n
Copy link
Author

muffl0n commented Jun 7, 2024

As there's nothing that can be done from our side, we can just go ahead. 👍

@echoix
Copy link
Collaborator

echoix commented Jun 7, 2024

But your wish would be what package(s) at which versions?

@echoix
Copy link
Collaborator

echoix commented Jun 7, 2024

Are the packages solved differently in a flavor that has less installed packages?

@muffl0n
Copy link
Author

muffl0n commented Jun 7, 2024

That's not a question that is easy to answer. ip@2.0.0 is vulnerable, but so is ip@2.0.1. There is no version of ip that has no active CVE. That's the reason why socks uses ip-address now: JoshGlazebrook/socks#94

As we're using make-fetch-happen which uses an old version of socks (transitively) we have no chance of solving this cleanly. Despite the possibility to ditch make-fetch-happen but I have no idea why this is installed and where it's used.

Seems like we have to wait for TooTallNate/proxy-agents#297 and dependent PRs in socks-proxy-agent, @npmcli/agent and make-fetch-happen.

I'm sorry that I can't be any more helpful cause I'm quite new to the node ecosystem and to Megalinter.

@muffl0n
Copy link
Author

muffl0n commented Jun 7, 2024

Maybe we can override to use socks@2.7.3 instead of socks@2.7.1 even though it's defined in a dependency down the graph?
Still not sure if that's a good idea. 😄

@echoix
Copy link
Collaborator

echoix commented Jun 7, 2024

Is ip-address really better since it doesn't have CVEs found yet, or ip has real problems?

Also, yes, it's possible to apply some overrides in dependency resolution for cases like this, where some fixes are available but not applied in the dependent package yet. The thing here is to know when to remove it. We would be trying to be smarter than the resolver.

https://medium.com/microsoftazure/how-to-fix-your-security-vulnerabilities-with-npm-override-c4b5be0ab4f6

@muffl0n
Copy link
Author

muffl0n commented Jun 7, 2024

ip-address is actively maintained while ip is not. That's the most important difference, imho. Besides: ip-address has no open CVEs at the moment.

@echoix
Copy link
Collaborator

echoix commented Jun 7, 2024

If you could find how to add an override, while we don't really have a package.json when creating the image, we could include it in main (and the release if it stays there until then) until needed. I have not problems with that.

@muffl0n
Copy link
Author

muffl0n commented Jun 8, 2024

I created #3623 to handle this. Imho we should move on with the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants