Skip to content

Commit c19e597

Browse files
authored
Merge pull request #253 from a-oren/TC-3865
feat(batch): add batch workspace analysis action and settings UI
2 parents 69dd3fe + 9a1f474 commit c19e597

19 files changed

Lines changed: 613 additions & 63 deletions

File tree

.github/workflows/IJ-latest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Set up JDK 17
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v3
2020
with:
21-
java-version: 17
21+
java-version: 21
2222
distribution: 'temurin'
2323
cache: 'gradle'
2424
- name: Grant execute permission for gradlew

.github/workflows/IJ.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
steps:
1717
- name: Checkout Code
1818
uses: actions/checkout@v4
19-
- name: Set up JDK 17
19+
- name: Set up JDK 21
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: 17
22+
java-version: 21
2323
distribution: 'temurin'
2424
cache: 'gradle'
2525
- name: Grant execute permission for gradlew

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v2
18-
- name: Set up JDK 17
18+
- name: Set up JDK 21
1919
uses: actions/setup-java@v3
2020
with:
21-
java-version: 17
21+
java-version: 21
2222
distribution: 'temurin'
2323
cache: 'gradle'
2424
- name: Grant execute permission for gradlew
@@ -34,10 +34,10 @@ jobs:
3434

3535
steps:
3636
- uses: actions/checkout@v2
37-
- name: Set up JDK 17
37+
- name: Set up JDK 21
3838
uses: actions/setup-java@v3
3939
with:
40-
java-version: 17
40+
java-version: 21
4141
distribution: 'temurin'
4242
cache: 'gradle'
4343
- name: Grant execute permission for gradlew
@@ -53,10 +53,10 @@ jobs:
5353

5454
steps:
5555
- uses: actions/checkout@v2
56-
- name: Set up JDK 17
56+
- name: Set up JDK 21
5757
uses: actions/setup-java@v3
5858
with:
59-
java-version: 17
59+
java-version: 21
6060
distribution: 'temurin'
6161
cache: 'gradle'
6262
- name: Grant execute permission for gradlew

.github/workflows/publish-marketplace.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Checkout repository
2525
uses: actions/checkout@v4
2626

27-
- name: Set up JDK 17
27+
- name: Set up JDK 21
2828
uses: actions/setup-java@v4
2929
with:
30-
java-version: 17
30+
java-version: 21
3131
distribution: 'temurin'
3232
cache: 'gradle'
3333

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v2
11-
- name: Set up JDK 17
11+
- name: Set up JDK 21
1212
uses: actions/setup-java@v3
1313
with:
14-
java-version: 17
14+
java-version: 21
1515
distribution: 'temurin'
1616
cache: 'gradle'
1717
- name: Grant execute permission for gradlew

.github/workflows/stage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
- name: Checkout sources
1818
uses: actions/checkout@v4
1919

20-
- name: Install Java 17
20+
- name: Install Java 21
2121
uses: actions/setup-java@v3
2222
with:
23-
java-version: 17
23+
java-version: 21
2424
distribution: 'oracle'
2525
cache: 'gradle'
2626

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ according to your preferences.
150150
- **Proxy Configuration** :
151151
<br >From IntelliJ IDEA Appearance & Behavior > System Settings > HTTP Proxy, you can configure a static proxy for all HTTP requests made by the plugin. This is useful when your environment requires going through a proxy to access external services. For example:`http://proxy.example.com:8080`
152152

153+
- **Batch Analysis** :
154+
<br >Configure settings for batch workspace analysis, which analyzes all packages in a JS/TS monorepo or Cargo workspace at once.
155+
<br >**Concurrency**: Maximum number of concurrent analyses during batch workspace analysis (default: 10).
156+
<br >**Continue on Error**: Continue analyzing remaining packages when one package analysis fails (default: enabled).
157+
<br >**Include Metadata**: Include additional metadata in batch analysis results (default: enabled).
158+
153159
- **Manifest Exclusion Patterns** :
154160
<br >You can exclude manifest files from component analysis using glob patterns. This is useful for excluding third-party dependencies, test files, or other manifests that should not be analyzed.
155161
<br >Enter one pattern per line. Examples: `**/node_modules/**/package.json` to exclude all package.json files in node_modules directories, or `test/**/pom.xml` to exclude all Maven files in test directories.
@@ -396,6 +402,16 @@ When modifying the grammar or lexer files, you need to regenerate the parser cla
396402
<br >Right-click on any manifest file and select **Exclude from Component Analysis** to quickly add an exclusion pattern for that specific file.
397403

398404

405+
- **Batch Workspace Analysis**
406+
<br >For JS/TS monorepos (npm, pnpm, yarn workspaces) and Cargo workspaces, you can run a batch analysis that scans
407+
all packages in the workspace at once and generates a combined vulnerability report.
408+
<br >To run a batch analysis, right-click in the **Project** window and click **Batch Workspace Analysis Report**.
409+
<br >The workspace root must contain a supported workspace layout:
410+
- JS/TS workspace: `package.json` with a lock file (`package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`)
411+
- Cargo workspace: `Cargo.toml` with `Cargo.lock`
412+
<br >Exclusion patterns configured in **Manifest Exclusion Patterns** are applied during workspace discovery to skip
413+
specific packages from the batch analysis.
414+
399415
- **Red Hat Dependency Analytics report**
400416
<br >The Red Hat Dependency Analytics report is a temporary HTML file that exist if the **Red Hat Dependency Analytics
401417
Report** tab remains open.

USAGE_DATA.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
* when plugin is started
66
* when plugin analyse dependency file for vulnerability(s) and file name
77
* when plugin analyse dependency file fails, error message and file name
8+
* when plugin runs batch workspace analysis on a workspace root
9+
* when plugin batch workspace analysis fails, error message
810
* when plugin is shutdown

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ version = providers.gradleProperty("projectVersion").get() // Plugin version
1515
val platformVersion = providers.gradleProperty("ideaVersion").get()
1616
// Set the JVM language level used to build the project.
1717
java {
18-
sourceCompatibility = JavaVersion.VERSION_17
19-
targetCompatibility = JavaVersion.VERSION_17
18+
sourceCompatibility = JavaVersion.VERSION_21
19+
targetCompatibility = JavaVersion.VERSION_21
2020
withSourcesJar()
2121
withJavadocJar()
2222
}

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ caffeine = "3.1.8"
44
commons-compress = "1.21"
55
commons-io = "2.16.1"
66
trustify-da-api-spec = "2.0.2"
7-
trustify-da-java-client = "0.0.15"
7+
trustify-da-java-client = "0.0.16"
88
github-api = "1.314"
99
junit = "4.13.2"
10-
mockito = "4.11.0"
10+
mockito = "5.14.2"
1111
packageurl-java = "1.4.1"
1212

1313
# plugins

0 commit comments

Comments
 (0)