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

Sign plugin artifacts #833

Open
Nek-12 opened this issue Feb 2, 2024 · 1 comment
Open

Sign plugin artifacts #833

Nek-12 opened this issue Feb 2, 2024 · 1 comment

Comments

@Nek-12
Copy link

Nek-12 commented Feb 2, 2024

https://blog.oversecured.com/Introducing-MavenGate-a-supply-chain-attack-method-for-Java-and-Android-applications/

Gradle task

./gradlew --write-verification-metadata pgp,sha256 --export-keys

did not find a pgp public key in a remote repository or the artifact is not signed.

 <component group="com.github.ben-manes" name="gradle-versions-plugin" version="0.50.0">
         <artifact name="gradle-versions-plugin-0.50.0.jar">
            <sha256 value="cc5381f2601200ed2405d44ea9eaab821560904bfdc9f17f8f0035a7706a4fb3" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
         <artifact name="gradle-versions-plugin-0.50.0.module">
            <sha256 value="2dacaacd0172ac5d258f6adc93399d5b091bc2029db9a3d665c4d00e4e7f6bec" origin="Generated by Gradle" reason="Artifact is not signed"/>
         </artifact>
      </component>

A fix is to:

  1. Start signing all artifacts, if not signed yet
  2. Upload a public pgp key used for signing artifacts to multiple public pgp repositories: https://keys.openpgp.org | https://pgp.mit.edu | https://keyserver.ubuntu.com/
@ben-manes
Copy link
Owner

The plugin portal only recently supported pgp signatures for plugins, so almost the entire ecosystem of plugins are unsigned. While it’s encouraging to enable signing now that it is supported, it is very misleading to pretend as if this is a security vulnerability that does not exist throughout your build regardless. The proper fix is to use repository constraints so that plugins are only searched in trusted sources. Assuming that you don’t screw up by trusting the wrong signature files won’t protect you.

@ben-manes ben-manes changed the title [Security] Repository is vulnerable to MavenGate Sign plugin artifacts Feb 2, 2024
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

2 participants