Introduction
In this article, we will be looking at detailed steps on how to use JFrog Curation to block Malicious Packages from entering our Environment. Like JFrog Xray, Curation also uses Policy based configuration mechanism to identify and block Malicious Package download. In this article, we will be taking NPM as an example.
Pre-requisites for JFrog Curation
NOTE: Starting Xray v3.78.2, Curation is bundled as part of Xray installation. Meaning, if you upgrade Xray version, you are also upgrading the Curation version along with it.
Malicious Package Block policy for Curation
-
Followed by Scope, which gives you a way to apply the policy Organisation-Wide or on Specific Remote Repository. Here, we will be using Specific Remote Repository as Scope and under that, we will further configure it for a specific Repository Type, such as NPM. This takes into account all the existing and upcoming NPM remote repositories.
-
Now we have to set the Policy Condition, meaning the rules defined to validate the package against it. Since we are creating a MaliciousBlock policy, we will be selecting the Malicious Package Policy Condition.
-
Curation also has Waivers, using which you can allow the blocked package and make it downloadable. Here, we will not be setting up any waivers, as it is an Optional requirement.
-
Lastly, we have Actions & Notifications, where we can configure the final action, which is Block or Dry Run. Block means Curation will block the package from being downloaded; on the other hand, Dry Run means it will simulate an outcome of what happens in case of a Violation. You can also configure Mail recipients who will receive an Email in case of a Violation when a Malicious Package is detected/requested.
We can check/audit the Curation Policy in action under Application/Platform => Curation => Audit UI. A sample screenshot is given below
Related links