Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implemented agent requests streams #96

Open
wants to merge 101 commits into
base: integration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
3c94bc4
[maven-release-plugin] prepare release release-tag-2.9.9.82
whitesource-ci Sep 6, 2022
53a51c5
[maven-release-plugin] prepare for next development iteration
whitesource-ci Sep 6, 2022
b7f0ff0
Merge branch 'integration'
Oct 6, 2022
c75af64
[maven-release-plugin] prepare release release-tag-2.9.9.83
whitesource-ci Oct 6, 2022
a9686a1
[maven-release-plugin] prepare for next development iteration
whitesource-ci Oct 6, 2022
64d839e
WEI-2525: added upload sca logs agent api
MuhammadAEws Jan 19, 2023
8ee1429
Adding some classes for new secretsFindins list (#89)
dor-hayun Jan 24, 2023
c699024
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
2db8021
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
73a46f1
WAC-1073 - Add check policies step Async in Agent API
HasanM91 Jan 25, 2023
933b2f8
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 25, 2023
74860be
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
d330a38
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
b491318
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
c351a8a
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
135a14c
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
80e1f67
add api constant
HasanM91 Jan 26, 2023
6db9087
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 29, 2023
74f6c35
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 29, 2023
73c6426
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 29, 2023
1bf3082
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 29, 2023
2fabd95
change/add serialVersionUID
HasanM91 Jan 29, 2023
8ddd0b7
WEI-2525: added UploadScaLogs agent api
MuhammadAEws Jan 30, 2023
8ea38fd
WEI-2519 Add support to async check policies API
romansoko Jan 30, 2023
a543b64
Merge branch 'WEI-2525' into WEI-2519
romansoko Jan 30, 2023
0813cad
Update WssServiceClientImpl.java
romansoko Jan 31, 2023
733e212
Update WssServiceClientImpl.java
romansoko Jan 31, 2023
ce27f28
add the Identifier to the request wrapper
HasanM91 Feb 1, 2023
052167c
fixed review comments
MuhammadAEws Feb 1, 2023
81d2a42
Merge pull request #92 from whitesource/WEI-2519
ChenLuigi Feb 1, 2023
8784260
[maven-release-plugin] prepare release release-tag-2.9.9.86
whitesource-ci Feb 1, 2023
b88c812
[maven-release-plugin] prepare for next development iteration
whitesource-ci Feb 1, 2023
c912d8c
WAC-1884 : add ignored vulnerabilities
shimondeitch Aug 21, 2023
82c9f85
WAC-1884 : add ignored vulnerabilities
shimondeitch Aug 21, 2023
dce2f23
Merge pull request #93 from whitesource/WAC-1884-check-policies-add-a…
ChenLuigi Aug 21, 2023
34cb92e
[maven-release-plugin] prepare release release-tag-2.9.9.87
whitesource-ci Aug 21, 2023
51aed63
Prepare version release-tag-2.9.9.87
ChenLuigi Aug 21, 2023
1cd7959
[maven-release-plugin] prepare release release-tag-2.9.9.87
whitesource-ci Aug 21, 2023
58f898a
[maven-release-plugin] prepare for next development iteration
whitesource-ci Aug 21, 2023
708e636
Add new dependency types (ML_MODEL,SWIFT)
ChenLuigi Jan 9, 2024
8cd2c15
[maven-release-plugin] prepare release release-tag-2.9.9.88
whitesource-ci Jan 9, 2024
8b0b0d6
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 9, 2024
ac4c7a9
#Add new FF to be supported (SBT,AIBOM and SWIFT)
ChenLuigi Jan 31, 2024
a66b11e
Add REACHABILITY_SUPPORT_ENABLED and REACHABILITY_SUPPORT_LANGUAGES
ChenLuigi Jan 31, 2024
47fb888
Add CONTAINER_SECURITY to EntitlementType
ChenLuigi Feb 1, 2024
0ada1f5
Merge pull request #94 from whitesource/add-additonal-FF
ChenLuigi Feb 1, 2024
00af8b9
[maven-release-plugin] prepare release release-tag-2.9.9.89
whitesource-ci Feb 1, 2024
a629315
[maven-release-plugin] prepare for next development iteration
whitesource-ci Feb 1, 2024
e806919
implemented streams in agents apis
MuhammadAEws Feb 11, 2024
5bfc122
Implemented Streams for agent requests
MuhammadAEws Feb 18, 2024
b0afb88
fixed in memory copy byte array
MuhammadAEws Feb 19, 2024
6cbe7e6
fixed diff encoding bug
MuhammadAEws Feb 20, 2024
7e35beb
[maven-release-plugin] prepare release release-tag-2.9.9.82
whitesource-ci Sep 6, 2022
1a20f85
[maven-release-plugin] prepare for next development iteration
whitesource-ci Sep 6, 2022
5e3e82f
[maven-release-plugin] prepare release release-tag-2.9.9.83
whitesource-ci Oct 6, 2022
a374ef4
[maven-release-plugin] prepare for next development iteration
whitesource-ci Oct 6, 2022
cfa422d
Adding some classes for new secretsFindins list (#89)
dor-hayun Jan 24, 2023
993a4c3
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
d3aedef
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
5bd8e78
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 25, 2023
a8536bb
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
6cc768e
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
39750f6
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
2bc75be
[maven-release-plugin] prepare release release-tag-2.9.9.84
whitesource-ci Jan 25, 2023
f65511f
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 25, 2023
18cedf6
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 29, 2023
d93550f
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 29, 2023
0d6eb74
[maven-release-plugin] prepare release release-tag-2.9.9.85
whitesource-ci Jan 29, 2023
ed981e4
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 29, 2023
fc0b1e5
WEI-2525: added upload sca logs agent api
MuhammadAEws Jan 19, 2023
c2662ca
WAC-1073 - Add check policies step Async in Agent API
HasanM91 Jan 25, 2023
caad0c7
WEI-2519 Add support to async check policies API
romansoko Jan 30, 2023
b4aec9e
add api constant
HasanM91 Jan 26, 2023
ccc8182
change/add serialVersionUID
HasanM91 Jan 29, 2023
7a90630
WEI-2525: added UploadScaLogs agent api
MuhammadAEws Jan 30, 2023
21d0b45
Update WssServiceClientImpl.java
romansoko Jan 31, 2023
5035a1f
Update WssServiceClientImpl.java
romansoko Jan 31, 2023
7e68db3
add the Identifier to the request wrapper
HasanM91 Feb 1, 2023
f93e3b4
fixed review comments
MuhammadAEws Feb 1, 2023
ba6dd6f
[maven-release-plugin] prepare release release-tag-2.9.9.86
whitesource-ci Feb 1, 2023
5a4a345
[maven-release-plugin] prepare for next development iteration
whitesource-ci Feb 1, 2023
b6f91b5
WAC-1884 : add ignored vulnerabilities
shimondeitch Aug 21, 2023
28cd034
WAC-1884 : add ignored vulnerabilities
shimondeitch Aug 21, 2023
56e0e98
[maven-release-plugin] prepare release release-tag-2.9.9.87
whitesource-ci Aug 21, 2023
e8a41ed
Prepare version release-tag-2.9.9.87
ChenLuigi Aug 21, 2023
e2f21eb
[maven-release-plugin] prepare release release-tag-2.9.9.87
whitesource-ci Aug 21, 2023
ce7c965
[maven-release-plugin] prepare for next development iteration
whitesource-ci Aug 21, 2023
d345b75
Add new dependency types (ML_MODEL,SWIFT)
ChenLuigi Jan 9, 2024
5cee982
[maven-release-plugin] prepare release release-tag-2.9.9.88
whitesource-ci Jan 9, 2024
1ec7d2f
[maven-release-plugin] prepare for next development iteration
whitesource-ci Jan 9, 2024
8493c8c
#Add new FF to be supported (SBT,AIBOM and SWIFT)
ChenLuigi Jan 31, 2024
2feb08f
Add REACHABILITY_SUPPORT_ENABLED and REACHABILITY_SUPPORT_LANGUAGES
ChenLuigi Jan 31, 2024
0d0e942
Add CONTAINER_SECURITY to EntitlementType
ChenLuigi Feb 1, 2024
fcbff3f
[maven-release-plugin] prepare release release-tag-2.9.9.89
whitesource-ci Feb 1, 2024
5cdd5cf
[maven-release-plugin] prepare for next development iteration
whitesource-ci Feb 1, 2024
730cb0e
implemented streams in agents apis
MuhammadAEws Feb 11, 2024
0b6c93c
Implemented Streams for agent requests
MuhammadAEws Feb 18, 2024
b26fbbf
fixed in memory copy byte array
MuhammadAEws Feb 19, 2024
2f07a73
fixed diff encoding bug
MuhammadAEws Feb 20, 2024
6de2144
Merge branch 'streams' of https://github.com/whitesource/agents into …
MuhammadAEws Feb 20, 2024
6fffcbe
optimized agents stream
MuhammadAEws Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>org.whitesource</groupId>
<artifactId>wss-agent-parent</artifactId>
<version>2.9.9.82-SNAPSHOT</version>
<version>2.9.9.90-SNAPSHOT</version>
<packaging>pom</packaging>

<name>White Source agent API</name>
Expand All @@ -29,7 +29,7 @@
<connection>scm:git:[email protected]:whitesource/agents.git</connection>
<developerConnection>scm:git:[email protected]:whitesource/agents.git</developerConnection>
<url>[email protected]:whitesource/agents.git</url>
<tag>release-tag-2.9.9.44</tag>
<tag>release-tag-2.9.9.86</tag>
</scm>
<issueManagement>
<url>https://github.com/whitesource/agents/issues</url>
Expand Down Expand Up @@ -59,7 +59,7 @@
<httpclient.version>4.5.13</httpclient.version>
<commonscodec.version>1.13</commonscodec.version>
<commonsio.version>2.9.0</commonsio.version>
<gson.version>2.9.0</gson.version>
<gson.version>2.10.1</gson.version>
<junit.version>4.13.2</junit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions wss-agent-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.whitesource</groupId>
<artifactId>wss-agent-parent</artifactId>
<version>2.9.9.82-SNAPSHOT</version>
<version>2.9.9.90-SNAPSHOT</version>
</parent>
<artifactId>wss-agent-api</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -63,4 +63,4 @@
</profile>
</profiles>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public final class APIConstants {
public static final String EXTRA_PROPERTIES = "extraProperties";
public static final String SCAN_SUMMARY_INFO = "scanSummaryInfo";
public static final String CONTRIBUTIONS = "contributions";
public static final String IDENTIFIER = "identifier";
public static final int MAX_POST_SIZE = 209715200; //= 200 MegaByte;

/* --- Messages --- */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.whitesource.agent.api.dispatch;

public enum AppFlags {
UPLOAD_SCA_LOGS("UPLOAD_SCA_LOGS"),
ASYNC_CHECK_POLICIES_ENABLED("ASYNC_CHECK_POLICIES_ENABLED"),
SBT_SUPPORT_ENABLED("SBT_SUPPORT_ENABLED"),
AI_BOM_SUPPORT_ENABLED("AI_BOM_SUPPORT_ENABLED"),
SWIFT_SUPPORT_ENABLED("SWIFT_SUPPORT_ENABLED"),
REACHABILITY_SUPPORT_ENABLED("REACHABILITY_SUPPORT_ENABLED"),
REACHABILITY_SUPPORT_LANGUAGES("REACHABILITY_SUPPORT_LANGUAGES");
private final String value;

AppFlags(String value) {
this.value = value;
}

public String getValue() {
return value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
package org.whitesource.agent.api.dispatch;

import org.whitesource.agent.api.model.AgentProjectInfo;
import org.whitesource.agent.api.model.ScanSummaryInfo;

import java.util.Collection;

public class AsyncCheckPolicyComplianceRequest extends BaseRequest<AsyncCheckPolicyComplianceResult> {

/* --- Static Members --- */

private static final long serialVersionUID = 925625972820830788L;

/* --- Members --- */

/**
* When set to true, check that all dependencies sent to WhiteSource comply with organization policies.
* When set to false, check that the added dependencies sent to WhiteSource comply with organization policies.
*/
protected boolean forceCheckAllDependencies;
/**
* When set to true, get vulnerabilities for all dependencies without updating project.
* When set to false, will not get vulnerabilities for all dependencies.
*/
protected boolean populateVulnerabilities;

/* --- Constructors --- */

/**
* Default constructor
*/
public AsyncCheckPolicyComplianceRequest() {
super(RequestType.ASYNC_CHECK_POLICY_COMPLIANCE);
forceCheckAllDependencies = false;
populateVulnerabilities = false;
}

/**
* Constructor
*
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Check policies for the all the Inventory or just for the new one.
*/
public AsyncCheckPolicyComplianceRequest(Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies) {
this();
this.projects = projects;
this.forceCheckAllDependencies = forceCheckAllDependencies;
}

/**
* Constructor
*
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Check policies for the all the Inventory or just for the new one.
* @param populateVulnerabilities get vulnerabilities for each dependency without updating project
*/
public AsyncCheckPolicyComplianceRequest(Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies, boolean populateVulnerabilities) {
this();
this.projects = projects;
this.forceCheckAllDependencies = forceCheckAllDependencies;
this.populateVulnerabilities = populateVulnerabilities;
}

/**
* Constructor
*
* @param orgToken WhiteSource organization token.
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Check policies for the all the Inventory or just for the new one.
* @param populateVulnerabilities get vulnerabilities for each dependency without updating project
*/
public AsyncCheckPolicyComplianceRequest(String orgToken, Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies, boolean populateVulnerabilities) {
this(projects, forceCheckAllDependencies, populateVulnerabilities);
this.orgToken = orgToken;

}

/**
* Constructor
*
* @param orgToken WhiteSource organization token.
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Check policies for the all the Inventory or just for the new one.
*/
public AsyncCheckPolicyComplianceRequest(String orgToken, Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies) {
this(projects, forceCheckAllDependencies);
this.orgToken = orgToken;
}

/**
* Constructor
*
* @param orgToken Organization token uniquely identifying the account at white source.
* @param product The product name or token to update.
* @param productVersion The product version.
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Boolean to check new data only or not.
* @param userKey user key uniquely identifying the account at white source.
* @param requesterEmail Email of the WhiteSource user that requests to update WhiteSource.
* @param logData list of FSA's log data events
* @param productToken The product token
*/
public AsyncCheckPolicyComplianceRequest(String orgToken, String product, String productVersion, Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies,
String userKey, String requesterEmail, String logData, String productToken) {
this(orgToken, projects, forceCheckAllDependencies);
this.product = product;
this.productVersion = productVersion;
this.userKey = userKey;
this.requesterEmail = requesterEmail;
this.logData = logData;
this.productToken = productToken;
}

/**
* Constructor
*
* @param orgToken Organization token uniquely identifying the account at white source.
* @param product The product name or token to update.
* @param productVersion The product version.
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Boolean to check new data only or not.
* @param userKey user key uniquely identifying the account at white source.
* @param requesterEmail Email of the WhiteSource user that requests to update WhiteSource.
* @param logData list of FSA's log data events
* @param productToken The product token
* @param scanSummaryInfo Summary statistics for each step in Unified Agent
*/
public AsyncCheckPolicyComplianceRequest(String orgToken, String product, String productVersion, Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies,
String userKey, String requesterEmail, String logData, String productToken, ScanSummaryInfo scanSummaryInfo) {
this(orgToken, projects, forceCheckAllDependencies);
this.product = product;
this.productVersion = productVersion;
this.userKey = userKey;
this.requesterEmail = requesterEmail;
this.logData = logData;
this.productToken = productToken;
this.scanSummaryInfo = scanSummaryInfo;
}

/**
* Constructor
*
* @param orgToken Organization token uniquely identifying the account at white source.
* @param product The product name or token to update.
* @param productVersion The product version.
* @param projects Open Source usage statement to check against policies.
* @param forceCheckAllDependencies Boolean to check new data only or not.
* @param userKey user key uniquely identifying the account at white source.
* @param requesterEmail Email of the WhiteSource user that requests to update WhiteSource.
* @param logData list of FSA's log data events
* @param productToken The product token
* @param scanSummaryInfo Summary statistics for each step in Unified Agent
* @param populateVulnerabilities get vulnerabilities for each dependency without updating project
*/
public AsyncCheckPolicyComplianceRequest(String orgToken, String product, String productVersion, Collection<AgentProjectInfo> projects, boolean forceCheckAllDependencies,
boolean populateVulnerabilities, String userKey, String requesterEmail, String logData, String productToken, ScanSummaryInfo scanSummaryInfo) {
this(orgToken, projects, forceCheckAllDependencies);
this.product = product;
this.productVersion = productVersion;
this.userKey = userKey;
this.requesterEmail = requesterEmail;
this.logData = logData;
this.productToken = productToken;
this.scanSummaryInfo = scanSummaryInfo;
this.populateVulnerabilities = populateVulnerabilities;
}

/* --- Getters / Setters --- */

public boolean isForceCheckAllDependencies() {
return forceCheckAllDependencies;
}

public void setForceCheckAllDependencies(boolean forceCheckAllDependencies) {
this.forceCheckAllDependencies = forceCheckAllDependencies;
}

public boolean isPopulateVulnerabilities() {
return populateVulnerabilities;
}

public void setPopulateVulnerabilities(boolean populateVulnerabilities) {
this.populateVulnerabilities = populateVulnerabilities;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package org.whitesource.agent.api.dispatch;

public class AsyncCheckPolicyComplianceResponseRequest extends BaseRequest<AsyncCheckPolicyComplianceResponseResult> {

/* --- Static Members --- */

private static final long serialVersionUID = 7267771318691275351L;

/* --- Members --- */

protected String identifier;

/**
* Default constructor
*/
public AsyncCheckPolicyComplianceResponseRequest(String identifier) {
super(RequestType.ASYNC_CHECK_POLICY_COMPLIANCE_RESPONSE);
this.identifier = identifier;
}

public AsyncCheckPolicyComplianceResponseRequest() {super(RequestType.ASYNC_CHECK_POLICY_COMPLIANCE_RESPONSE);}

public String getIdentifier() {
return identifier;
}

public void setIdentifier(String identifier) {
this.identifier = identifier;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.whitesource.agent.api.dispatch;

public class AsyncCheckPolicyComplianceResponseResult extends CheckPolicyComplianceResult {

/* --- Static Members --- */

private static final long serialVersionUID = -9005803185728108040L;

/* --- Members --- */


/**
* Default constructor
*/
public AsyncCheckPolicyComplianceResponseResult() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.whitesource.agent.api.dispatch;

import java.io.Serializable;

public class AsyncCheckPolicyComplianceResult extends BaseResult {

/* --- Static Members --- */

private static final long serialVersionUID = 7236121775887105115L;

/* --- Members --- */

private String identifier;

/**
* Default constructor
*/
public AsyncCheckPolicyComplianceResult() {
}

public String getIdentifier() {
return identifier;
}

public void setIdentifier(String identifier) {
this.identifier = identifier;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package org.whitesource.agent.api.dispatch;

public class AsyncCheckPolicyComplianceStatusRequest extends BaseRequest<AsyncCheckPolicyComplianceStatusResult> {

/* --- Static Members --- */

private static final long serialVersionUID = -3011749510680068374L;

/* --- Members --- */

protected String identifier;

/**
* Default constructor
*/
public AsyncCheckPolicyComplianceStatusRequest(String identifier) {
super(RequestType.ASYNC_CHECK_POLICY_COMPLIANCE_STATUS);
this.identifier = identifier;
}

public AsyncCheckPolicyComplianceStatusRequest() {
super(RequestType.ASYNC_CHECK_POLICY_COMPLIANCE_STATUS);
}

public String getIdentifier() {
return identifier;
}

public void setIdentifier(String identifier) {
this.identifier = identifier;
}
}
Loading