Skip to content

Commit 7fb9424

Browse files
committed
feat: update to trustify-da
1 parent dc8fc86 commit 7fb9424

File tree

10 files changed

+115
-115
lines changed

10 files changed

+115
-115
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -180,16 +180,16 @@ according to your preferences.
180180
You can specify a specific path to these binaries, and others by settings the following parameters as environment
181181
variables or system properties:
182182

183-
* `EXHORT_SYFT_PATH` : Specify the absolute path of `syft` executable.
184-
* `EXHORT_SYFT_CONFIG_PATH` : Specify the absolute path to the Syft configuration file.
185-
* `EXHORT_SKOPEO_PATH` : Specify the absolute path of `skopeo` executable.
186-
* `EXHORT_SKOPEO_CONFIG_PATH` : Specify the absolute path to the authentication file used by the `skopeo inspect`
183+
* `TRUSTIFY_DA_SYFT_PATH` : Specify the absolute path of `syft` executable.
184+
* `TRUSTIFY_DA_SYFT_CONFIG_PATH` : Specify the absolute path to the Syft configuration file.
185+
* `TRUSTIFY_DA_SKOPEO_PATH` : Specify the absolute path of `skopeo` executable.
186+
* `TRUSTIFY_DA_SKOPEO_CONFIG_PATH` : Specify the absolute path to the authentication file used by the `skopeo inspect`
187187
command.
188-
* `EXHORT_DOCKER_PATH` : Specify the absolute path of `docker` executable.
189-
* `EXHORT_PODMAN_PATH` : Specify the absolute path of `podman` executable.
190-
* `EXHORT_IMAGE_PLATFORM` : Specify the platform used for multi-arch images.
191-
* `EXHORT_MVN_USER_SETTINGS` : Specify the absolute path to the Maven user settings file.
192-
* `EXHORT_MVN_LOCAL_REPO` : Specify the absolute path to the Maven local repository.
188+
* `TRUSTIFY_DA_DOCKER_PATH` : Specify the absolute path of `docker` executable.
189+
* `TRUSTIFY_DA_PODMAN_PATH` : Specify the absolute path of `podman` executable.
190+
* `TRUSTIFY_DA_IMAGE_PLATFORM` : Specify the platform used for multi-arch images.
191+
* `TRUSTIFY_DA_MVN_USER_SETTINGS` : Specify the absolute path to the Maven user settings file.
192+
* `TRUSTIFY_DA_MVN_LOCAL_REPO` : Specify the absolute path to the Maven local repository.
193193

194194
![ Animated screenshot showing the inline reporting feature of Image Analysis ](src/main/resources/images/image-analysis.gif)
195195

@@ -239,20 +239,20 @@ When modifying the grammar or lexer files, you need to regenerate the parser cla
239239
- Comments and complex shell commands
240240
- Comprehensive syntax error handling
241241

242-
- **Excluding dependencies with `exhortignore`**
242+
- **Excluding dependencies with `trustify-da-ignore`**
243243
<br >You can exclude a package from analysis by marking the package for exclusion.
244-
If you want to ignore vulnerabilities for a dependency in a `pom.xml` file, you must add `exhortignore` as a comment
244+
If you want to ignore vulnerabilities for a dependency in a `pom.xml` file, you must add `trustify-da-ignore` as a comment
245245
against the dependency, group id, artifact id, or version scopes of that particular dependency in the manifest file.
246246
For example:
247247
```xml
248-
<dependency> <!--exhortignore-->
248+
<dependency> <!--trustify-da-ignore-->
249249
<groupId>...</groupId>
250250
<artifactId>...</artifactId>
251251
<version>...</version>
252252
</dependency>
253253
```
254254

255-
If you want to ignore vulnerabilities for a dependency in a `package.json` file, you must add `exhortignore` as a
255+
If you want to ignore vulnerabilities for a dependency in a `package.json` file, you must add `trustify-da-ignore` as a
256256
attribute-value pair.
257257
For example:
258258
```json
@@ -270,33 +270,33 @@ When modifying the grammar or lexer files, you need to regenerate the parser cla
270270
"jsonwebtoken": "^8.5.1",
271271
"mongoose": "^5.9.18"
272272
},
273-
"exhortignore": [
273+
"trustify-da-ignore": [
274274
"jsonwebtoken"
275275
]
276276
}
277277
```
278278

279-
If you want to ignore vulnerabilities for a dependency in a `go.mod` file, you must add `exhortignore` as a comment
279+
If you want to ignore vulnerabilities for a dependency in a `go.mod` file, you must add `trustify-da-ignore` as a comment
280280
against the dependency in the manifest file.
281281
For example:
282282
```text
283283
require (
284-
golang.org/x/sys v1.6.7 // exhortignore
284+
golang.org/x/sys v1.6.7 // trustify-da-ignore
285285
)
286286
```
287287

288-
If you want to ignore vulnerabilities for a dependency in a `requirements.txt` file, you must add `exhortignore` as a
288+
If you want to ignore vulnerabilities for a dependency in a `requirements.txt` file, you must add `trustify-da-ignore` as a
289289
comment against the dependency in the manifest file.
290290
For example:
291291
```text
292-
requests==2.28.1 # exhortignore
292+
requests==2.28.1 # trustify-da-ignore
293293
```
294-
If you want to ignore vulnerabilities for a dependency in a `build.gradle` file, you must add `exhortignore` as a
294+
If you want to ignore vulnerabilities for a dependency in a `build.gradle` file, you must add `trustify-da-ignore` as a
295295
comment against the dependency in the manifest file.
296296
For example:
297297
```text
298-
implementation "log4j:log4j:1.2.17" // exhortignore
299-
implementation group: 'log4j', name: 'log4j', version: '1.2.17' // exhortignore
298+
implementation "log4j:log4j:1.2.17" // trustify-da-ignore
299+
implementation group: 'log4j', name: 'log4j', version: '1.2.17' // trustify-da-ignore
300300
```
301301

302302
- **Excluding developmental or test dependencies**

src/main/java/org/jboss/tools/intellij/componentanalysis/CAUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class CAUtil {
3333

3434
public static String PACKAGE_JSON = "package.json";
35-
public static String EXHORT_IGNORE = "exhortignore";
35+
public static String TRUSTIFY_DA_IGNORE = "trustify-da-ignore";
3636
public static String DEPENDENCIES = "dependencies";
3737

3838
public static Map<Dependency, List<PsiElement>> getDependencyListMap(PsiFile file) {
@@ -77,7 +77,7 @@ private static Set<String> getIgnoredDependencies(PsiFile file) {
7777
Set<String> ignored = Arrays.stream(file.getChildren())
7878
.filter(e -> e instanceof JsonObject)
7979
.flatMap(e -> Arrays.stream(e.getChildren()))
80-
.filter(e -> e instanceof JsonProperty && EXHORT_IGNORE.equals(((JsonProperty) e).getName()))
80+
.filter(e -> e instanceof JsonProperty && TRUSTIFY_DA_IGNORE.equals(((JsonProperty) e).getName()))
8181
.flatMap(e -> Arrays.stream(e.getChildren()))
8282
.filter(e -> e instanceof JsonArray)
8383
.flatMap(e -> Arrays.stream(e.getChildren()))

src/main/java/org/jboss/tools/intellij/componentanalysis/golang/GoCAAnnotator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.util.regex.Matcher;
2929
import java.util.regex.Pattern;
3030

31-
import static org.jboss.tools.intellij.componentanalysis.CAUtil.EXHORT_IGNORE;
31+
import static org.jboss.tools.intellij.componentanalysis.CAUtil.TRUSTIFY_DA_IGNORE;
3232

3333
public class GoCAAnnotator extends CAAnnotator {
3434
public static final Pattern REQUIRE_PATTERN = Pattern.compile("^\\s*([a-zA-Z0-9._/-]+)\\s+(v?[0-9]+(?:\\.[0-9]+)*[0-9a-zA-Z\\-+._]*)(?:\\s*//.*)?$");
@@ -70,8 +70,8 @@ protected Map<Dependency, List<PsiElement>> getDependencies(PsiFile file) {
7070
continue;
7171
}
7272

73-
// Skip if line contains exhortignore
74-
if (line.contains(EXHORT_IGNORE)) {
73+
// Skip if line contains trustify-da-ignore
74+
if (line.contains(TRUSTIFY_DA_IGNORE)) {
7575
continue;
7676
}
7777

src/main/java/org/jboss/tools/intellij/componentanalysis/gradle/GradleCAAnnotator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.util.Map;
3030
import java.util.Objects;
3131

32-
import static org.jboss.tools.intellij.componentanalysis.CAUtil.EXHORT_IGNORE;
32+
import static org.jboss.tools.intellij.componentanalysis.CAUtil.TRUSTIFY_DA_IGNORE;
3333

3434
public class GradleCAAnnotator extends CAAnnotator {
3535

@@ -44,7 +44,7 @@ protected Map<Dependency, List<PsiElement>> getDependencies(PsiFile file) {
4444
Map<Dependency, List<PsiElement>> resultMap = new HashMap<>();
4545
Arrays.stream(file.getChildren())
4646
.filter(e -> e instanceof Artifact)
47-
.filter(artifact -> ((Artifact)artifact).getComment() == null || Objects.nonNull(((Artifact)artifact).getComment()) && !((Artifact)artifact).getComment().getText().contains(EXHORT_IGNORE))
47+
.filter(artifact -> ((Artifact)artifact).getComment() == null || Objects.nonNull(((Artifact)artifact).getComment()) && !((Artifact)artifact).getComment().getText().contains(TRUSTIFY_DA_IGNORE))
4848
.map(dep -> (Artifact)dep)
4949
.forEach( dep -> {
5050
Dependency dependency = new Dependency("maven", dep.getGroup().getText().replace("\"","") , dep.getArtifactId().getText(),dep.getVersion().getText());

src/main/java/org/jboss/tools/intellij/componentanalysis/maven/MavenCAAnnotator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import java.util.Optional;
3535

3636
import static org.jboss.tools.intellij.componentanalysis.CAUtil.DEPENDENCIES;
37-
import static org.jboss.tools.intellij.componentanalysis.CAUtil.EXHORT_IGNORE;
37+
import static org.jboss.tools.intellij.componentanalysis.CAUtil.TRUSTIFY_DA_IGNORE;
3838

3939
public class MavenCAAnnotator extends CAAnnotator {
4040

@@ -58,7 +58,7 @@ protected Map<Dependency, List<PsiElement>> getDependencies(PsiFile file) {
5858
.filter(e -> e instanceof XmlTag && "dependency".equals(((XmlTag) e).getName()))
5959
.filter(e -> Arrays.stream(e.getChildren())
6060
.noneMatch(c -> c instanceof XmlComment
61-
&& EXHORT_IGNORE.equals(((XmlComment) c).getCommentText().trim())))
61+
&& TRUSTIFY_DA_IGNORE.equals(((XmlComment) c).getCommentText().trim())))
6262
.map(e -> (XmlTag) e)
6363
.forEach(d -> {
6464
List<XmlTag> elements = Arrays.stream(d.getChildren())

src/main/java/org/jboss/tools/intellij/componentanalysis/pypi/PipCAAnnotator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import java.util.List;
3030
import java.util.Map;
3131

32-
import static org.jboss.tools.intellij.componentanalysis.CAUtil.EXHORT_IGNORE;
32+
import static org.jboss.tools.intellij.componentanalysis.CAUtil.TRUSTIFY_DA_IGNORE;
3333

3434
public class PipCAAnnotator extends CAAnnotator {
3535
@Override
@@ -50,7 +50,7 @@ protected Map<Dependency, List<PsiElement>> getDependencies(PsiFile file) {
5050
.noneMatch(c -> {
5151
String comment = c.getText().trim();
5252
if (!comment.isEmpty() && '#' == comment.charAt(0)) {
53-
return EXHORT_IGNORE.equals(comment.substring(1).trim());
53+
return TRUSTIFY_DA_IGNORE.equals(comment.substring(1).trim());
5454
}
5555
return false;
5656
}))

0 commit comments

Comments
 (0)