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

Vulnerabilies in @apollo/protobufjs (dependency of apollo-reporting-protobuf) #6835

Closed
belegur opened this issue Aug 22, 2022 · 8 comments
Closed

Comments

@belegur
Copy link

belegur commented Aug 22, 2022

Hello, reporting here some security issues that we are receiving in the aws inspector.

The last version (1.2.4) of the @apollo/protobufjs fork has a lot of vulnerabilities in its cli package-lock.json.
This package-lock.json is distributed with the package, so we get all the security warnings when the inspector scans the file.

Hoisted from apollo-server-core#apollo-reporting-protobuf#@apollo#protobufjs

All these vulnerabilities have been fixed in the original protobufjs repository, but the fork is not keeping in sync.

Related vulnerabilities:
CVE-2021-44906
IN1-JS-LODASH-1040724
CVE-2022-21680
CVE-2021-23358

@glasser
Copy link
Member

glasser commented Aug 22, 2022

I doubt any of these are real problems affecting our users — you don't even run the CLI on your machine, just we do. Would your scanner be happier if we just added cli/package-lock.json to our npmignore to leave it out of the bundle?

@belegur
Copy link
Author

belegur commented Aug 23, 2022

Yes @glasser, I think that would be enough for us 👏

@fjaguero
Copy link

fjaguero commented Sep 7, 2022

This would be beneficial for us as we are getting those vulnerabilities warnings.

glasser added a commit to apollographql/protobuf.js that referenced this issue Sep 30, 2022
@glasser
Copy link
Member

glasser commented Sep 30, 2022

Hmm. I added a .npmignore file which includes package-lock.json, but it's still showing up in v1.2.5! I'd expect npm pack --dry-run 2>&1 | grep package-lock (in the repo) to not print anything but it does. Am I doing something wrong?

@belegur
Copy link
Author

belegur commented Sep 30, 2022

Maybe you need to remove them from the files in the package.json. I believe that any file explicitly specified there will be published.

@glasser
Copy link
Member

glasser commented Sep 30, 2022

Heh, that seems right!

glasser added a commit to apollographql/protobuf.js that referenced this issue Sep 30, 2022
@glasser
Copy link
Member

glasser commented Sep 30, 2022

Looks like this will be fixed by #6967 which will go into Apollo Server v4 (currently in release candidate, should be released in a week or two)

@glasser glasser closed this as completed Sep 30, 2022
glasser pushed a commit that referenced this issue Sep 30, 2022
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to version-4, this PR
will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`version-4` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `version-4`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @apollo/server-integration-testsuite@4.0.0-rc.15

### Patch Changes

- Updated dependencies
\[[`d20842824`](d208428),
[`e1455d583`](e1455d5)]:
    -   @apollo/usage-reporting-protobuf@4.0.0-rc.2
    -   @apollo/server@4.0.0-rc.15

## @apollo/server@4.0.0-rc.15

### Patch Changes

- [#6897](#6897)
[`e1455d583`](e1455d5)
Thanks [@bonnici](https://github.com/bonnici)! - Usage reporting: always
send traces over 10MB as stats.

- Updated dependencies
\[[`d20842824`](d208428)]:
    -   @apollo/usage-reporting-protobuf@4.0.0-rc.2

## @apollo/usage-reporting-protobuf@4.0.0-rc.2

### Patch Changes

- [#6967](#6967)
[`d20842824`](d208428)
Thanks [@renovate](https://github.com/apps/renovate)! - Update
`@apollo/protobufjs` dependency to avoid false positives in
vulnerability scans
(<#6835>)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@belegur
Copy link
Author

belegur commented Oct 3, 2022

Nice! Thank you @glasser

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants