[0.78][Android] Making the JitPack Repository optional #877
cortinico
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
tl;dr: We're introducing a configuration to let you exclude the JitPack repository from the list of default repositories. This change aims to improve security and reduce the risk of supply chain attacks on React Native/Android apps.
Context
JitPack is a repository used to distribute Java/Android artifacts. Over the years, JitPack has been included by default in the React Native Community template and the React Native Gradle Plugin (RNGP), because of its ease of use and simplicity (e.g. you don’t need to create an account or sign artifacts to publish a library on JitPack).
However, this ease of use comes with a cost. Artifacts hosted on Jitpack are harder to verify and malicious users could use it for supply chain attacks.
You can find plenty of documentation online on why JitPack could be dangerous for your project, such as:
Plus the repository has been exposed in the past to downtimes:
We believe that adding Jitpack by default to the list of repositories included in your project, could expose your project to potential security risks.
Therefore we’re taking measures to let you exclude Jitpack from the list of repositories used.
What is changing?
Starting with React Native 0.78, you'll be able to control the inclusion of the JitPack repository in your project by setting the
react.includeJitpackRepository
property in yourandroid/gradle.properties
file:The default value for this property is true so Jitpack will be included even if you don’t specify it. That's to retain the current behavior.
We’re considering potentially changing the default value to be false, but we don’t have a timeline for this change yet.
Who is affected?
Unless you specify
react.includeJitpackRepository=false
in your project, you won’t be affected at all.Your project will continue to build as usual.
Which libraries are relying on Jitpack?
If you specify
react.includeJitpackRepository=false
in your project, your project could stop building.That’s because some React Native libraries are using JitPack and won’t be able to download dependencies anymore.
From our initial investigation, this is a non exhaustive list of React Native libraries that are using JitPack:
If you're using any of these libraries, and specify
react.includeJitpackRepository=false in your project
, please make sure you either:Beta Was this translation helpful? Give feedback.
All reactions