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

Feature/remove unirest #1

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c7a7074
unirest removed from repo meta analyzer files
mehab Jan 17, 2023
39f31f3
empty commit
mehab Jan 17, 2023
7e40086
more removal of unirest
mehab Jan 19, 2023
6cc00de
merged changes from upstream master
mehab Jan 19, 2023
2c99bf2
defect dojo and oss index changed
mehab Jan 20, 2023
b1dca1d
removed unirest client
mehab Jan 23, 2023
e691dda
cleanup
mehab Jan 23, 2023
89ab958
removed spdx based test that is not working and is not relevant
mehab Jan 23, 2023
f7d6c1c
added unit tests for vulndb
mehab Jan 24, 2023
9e45ee7
added tests
mehab Jan 27, 2023
d718caa
Merge branch 'master' of https://github.com/mehab/dependency-track in…
mehab Jan 27, 2023
c5b0e96
Merge branch 'DependencyTrack:master' into feature/removeUnirest
mehab Jan 30, 2023
d405ab8
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Jan 31, 2023
21d2ae5
Merge branch 'feature/removeUnirest' of https://github.com/mehab/depe…
mehab Jan 31, 2023
abba6a7
test updated
mehab Jan 31, 2023
abd98a9
test updated
mehab Jan 31, 2023
3ccef34
test changes
mehab Jan 31, 2023
7298bde
proper fix
mehab Jan 31, 2023
bedb383
tests added and workiing
mehab Jan 31, 2023
5d7141b
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Jan 31, 2023
7a7b938
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Jan 31, 2023
f24701a
PR review fixes
mehab Feb 1, 2023
f156265
removed changes for bugfix from this branch
mehab Feb 1, 2023
d2bdcad
removed problematic dependency
mehab Feb 1, 2023
18524f7
removed vulndbdatamirror library
mehab Feb 1, 2023
5c5da89
changes pulled in from citi fork
mehab Feb 2, 2023
5b2bcd0
some fixes
mehab Feb 2, 2023
3fa7d4f
sonatype fixes
mehab Feb 2, 2023
c34cec8
sonatype fixes
mehab Feb 2, 2023
9496c4c
PR review fixes
mehab Feb 3, 2023
4a34be1
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Feb 3, 2023
2a7f648
renamed package per standard
mehab Feb 3, 2023
119b8f5
changed package name to follow convention
mehab Feb 3, 2023
8a049f1
changes from merge master and pr review
mehab Feb 6, 2023
4309ca9
merged changes from master upstream
mehab Feb 6, 2023
2e8af4a
intermediate changes
mehab Feb 10, 2023
860c90e
all changes completed except additional unit test
mehab Feb 10, 2023
a119f8b
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Feb 10, 2023
9cfd580
fixed unit test
mehab Feb 11, 2023
58d863f
content type found and updated for defectdojo and fortifyssc
mehab Feb 12, 2023
b95545a
Merge branch 'DependencyTrack:master' into feature/removeUnirest
mehab Feb 12, 2023
3d780f4
Merge branch 'master' of https://github.com/DependencyTrack/dependenc…
mehab Feb 12, 2023
e2c6eee
resolved merged error
mehab Feb 12, 2023
46e6640
Merge branch 'feature/removeUnirest' of https://github.com/mehab/depe…
mehab Feb 12, 2023
c974b72
merged changes from main
mehab Feb 13, 2023
1c1b1d3
added tests with wiremock
mehab Feb 13, 2023
38b3115
added tests with wiremock
mehab Feb 13, 2023
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
18 changes: 18 additions & 0 deletions .checkstyle-header
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* This file is part of Dependency-Track.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) Steve Springett. All Rights Reserved.
*/
17 changes: 17 additions & 0 deletions .checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="localeLanguage" value="en"/>
<module name="Header">
<property name="charset" value="UTF-8"/>
<property name="headerFile" value=".checkstyle-header"/>
</module>
<module name="TreeWalker">
<module name="AvoidStarImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
</module>
</module>
4 changes: 2 additions & 2 deletions .github/workflows/_meta-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
uses: docker/[email protected]

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.3.0
uses: docker/setup-buildx-action@v2.4.0
id: buildx
with:
install: true
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:

- name: Run Trivy Vulnerability Scanner
if: ${{ inputs.publish-container }}
uses: aquasecurity/trivy-action@0.8.0
uses: aquasecurity/trivy-action@0.9.0
with:
image-ref: docker.io/dependencytrack/${{ matrix.distribution }}:${{ inputs.app-version }}
format: 'sarif'
Expand Down
62 changes: 44 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@
<lib.lucene.version>8.11.2</lib.lucene.version>
<lib.packageurl.version>1.4.1</lib.packageurl.version>
<lib.pebble.version>3.2.0</lib.pebble.version>
<lib.unirest.version>3.14.1</lib.unirest.version>
<lib.vulndb-data-mirror.version>1.0.1</lib.vulndb-data-mirror.version>
<lib.resilience4j.version>2.0.1</lib.resilience4j.version>
<lib.woodstox.version>6.5.0</lib.woodstox.version>
<lib.junit-params.version>1.1.1</lib.junit-params.version>
<lib.signpost-core.version>2.1.1</lib.signpost-core.version>
<!-- JDBC Drivers -->
<lib.jdbc-driver.mssql.version>11.2.3.jre17</lib.jdbc-driver.mssql.version>
<!-- Leave at 8.0.29 until https://github.com/datanucleus/datanucleus-rdbms/issues/446 is resolved! -->
Expand Down Expand Up @@ -226,31 +225,33 @@
<artifactId>pebble</artifactId>
<version>${lib.pebble.version}</version>
</dependency>
<!-- VulnDB data mirroring and parsing -->

<dependency>
<groupId>us.springett</groupId>
<artifactId>vulndb-data-mirror</artifactId>
<version>${lib.vulndb-data-mirror.version}</version>
<!-- Exclude transitive version so Dependency-Track can manage independently -->
<exclusions>
<exclusion>
<groupId>io.github.openunirest</groupId>
<artifactId>open-unirest-java</artifactId>
</exclusion>
</exclusions>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<!-- Unirest -->

<dependency>
<groupId>oauth.signpost</groupId>
<artifactId>signpost-core</artifactId>
<version>${lib.signpost-core.version}</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.konghq</groupId>
<artifactId>unirest-java</artifactId>
<version>${lib.unirest.version}</version>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.14</version>
</dependency>


<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>${lib.woodstox.version}</version>
</dependency>
<!-- Package version parsing -->

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
Expand Down Expand Up @@ -389,6 +390,31 @@
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<configLocation>${project.basedir}/.checkstyle.xml</configLocation>
<includeResources>false</includeResources>
<includeTestResources>false</includeTestResources>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.6.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM eclipse-temurin:17.0.5_8-jre-focal@sha256:d98a588cd72194d040c83dad4eabed97c17677d592db7b964d31f12f9686dcbc AS jre-build

FROM debian:bullseye-20230109-slim@sha256:98d3b4b0cee264301eb1354e0b549323af2d0633e1c43375d0b25c01826b6790
FROM debian:bullseye-20230202-slim@sha256:d51d5c391d202d5e2e0294a9df6ff077ed40583b11831d347d418690da496c50

# Arguments that can be passed at build time
# Directory names must end with / to avoid errors when ADDing and COPYing
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/dependencytrack/common/ConfigKey.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of Dependency-Track.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) Steve Springett. All Rights Reserved.
*/
package org.dependencytrack.common;

import alpine.Config;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/org/dependencytrack/event/IndexEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.dependencytrack.event;

import alpine.event.framework.AbstractChainableEvent;
import alpine.event.framework.SingletonCapableEvent;
import org.dependencytrack.model.Component;
import org.dependencytrack.model.Cpe;
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/dependencytrack/event/OsvMirrorEvent.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of Dependency-Track.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) Steve Springett. All Rights Reserved.
*/
package org.dependencytrack.event;

import alpine.event.framework.Event;
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/org/dependencytrack/event/SnykAnalysisEvent.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* This file is part of Dependency-Track.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
* Copyright (c) Steve Springett. All Rights Reserved.
*/
package org.dependencytrack.event;

import org.dependencytrack.model.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.dependencytrack.persistence.QueryManager;
import org.dependencytrack.util.DateUtil;
import org.json.JSONObject;
import us.springett.parsers.cpe.Cpe;

import java.util.Date;
import java.util.List;
Expand Down
Loading