Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.fortify:plugin-api:1.2.2320'
}
dependencies {
implementation("com.github.fortify:plugin-api:1.2.2320")
}
<dependency>
<groupId>com.github.fortify</groupId>
<artifactId>plugin-api</artifactId>
<version>1.2.2320</version>
</dependency>
libraryDependencies += "com.github.fortify" % "plugin-api" % "1.2.2320"
:dependencies [[com.github.fortify/plugin-api "1.2.2320"]]
com.fortify.plugin.spi.ParserPlugin
src/main/resources/schema/pluginmanifest-1.0.xsd
plugin implementation JAR has to contain all plugin dependencies - be self-contained
If a plugin has any dependencies on javaEE packages, the plugin developer must bundle the necessary javaEE jars into the plugin's own library path, and must not rely on these packages being available from the JRE. The JavaEE modules have been removed from current versions of Java post-Java8 and will not be available in SSC versions after 18.20.
./gradlew build
: Build the plugin./gradlew publishToMavenLocal
: Publish the plugin to local Maven repository
mavenLocal()
repository to a parser plugin to use a locally built version for testing./gradlew publishToOSSRH closeOSSRHStagingRepository
: Publish the plugin to OSSRH/Maven Central
ORG_GRADLE_PROJECT_
prefix to set these properties through environment variables):
signingKey
: Used to sign the artifactssigningPassword
: Used to sign the artifactsOSSRHUsername
: Used to publish to OSSRHOSSRHPassword
: Used to publish to OSSRH-SNAPSHOT
, the artifacts will end up at https://s01.oss.sonatype.org/content/repositories/snapshots/For SSC to consider issues as "Open Source" issues, the parser plugin must add the element "<parser-type>DEPENDENCY_SCAN</parser-type>" to the <issue-parser> element in the plugin's plugin.xml file.
The parser plugin must also include these custom attributes for the vulnerabilities: