Skip to content

Commit c8293f0

Browse files
committed
Merge branch 'master' into slicing
2 parents d03627c + b8658cc commit c8293f0

File tree

391 files changed

+1349
-1281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

391 files changed

+1349
-1281
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ In case of bugs happening on the client (when performing scans):
2727
**Expected behavior**
2828
A clear and concise description of what you expected to happen.
2929

30-
**Vulas version**
31-
- Vulas version (release and commit)
30+
**Steady version**
31+
- Steady version (release and commit)
3232

3333
**In case of bugs in a Web frontend**
3434
- Browser type and version [e.g. chrome, safari]
@@ -37,7 +37,7 @@ A clear and concise description of what you expected to happen.
3737
**In case of bugs happening on the client (when performing scans)**
3838
- OS/version
3939
- Java JVM/version or Python version
40-
- Vulas client (Maven plugin, Gradle plugin, CLI, setuptools plugin)
40+
- Steady client (Maven plugin, Gradle plugin, CLI, setuptools plugin)
4141
- Console log(s) (with confidential information removed)
4242
- URL of a public repo that can be used for reproducing (minimal example if possible)
4343

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ kubernetes/helm/vulnerability-assessment-tool-admin/charts/nginx-ingress/files/t
4040
/docker/**/import_vulas_kb.sh
4141
google-java-format-*.jar
4242
.DS_Store
43+
docker/kb-importer/data/**
44+
**/*.buildinfo
45+
docker/kb-importer/data/**

.pipeline/config.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.reuse/dep5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Files: lib/changedistiller-0.0.4-SNAPSHOT.jar
3131
Copyright: 2011-2013 Software Architecture and Evolution Lab, Department of Informatics, UZH
3232
License: Apache-2.0
3333

34-
Files: lib/dependency-finder-1.2.1-beta5.jar
34+
Files: lib/dependency-finder-1.2.1-beta5-log4j.jar
3535
Copyright: 2001-2009 Jean Tessier
3636
License: BSD-3-Clause
3737

.travis/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Vulas
2-
VULAS_RELEASE=3.2.0-SNAPSHOT
1+
# Eclipse Steady
2+
VULAS_RELEASE=3.2.1-SNAPSHOT
33
VULAS_ENV=dev
44

55
# PostgreSQL

.travis/vulas-custom.properties.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ vulas.core.instr.sourceDir =
2222
vulas.core.instr.targetDir = vulas/target
2323
vulas.core.instr.includeDir = vulas/include
2424
vulas.core.instr.libDir = vulas/lib
25-
vulas.core.instr.instrumentorsChoosen = com.sap.psr.vulas.monitor.trace.SingleTraceInstrumentor
25+
vulas.core.instr.instrumentorsChoosen = org.eclipse.steady.java.monitor.trace.SingleTraceInstrumentor
2626
vulas.core.instr.searchRecursive = true
2727

2828
vulas.report.reportDir = vulas/report

Jenkinsfile

Lines changed: 83 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,25 @@ spec:
1717
value: "-Duser.home=/home/jenkins -Xmx4096m -Xms4096m"
1818
- name: "MAVEN_CONFIG"
1919
value: "/home/jenkins/.m2"
20+
- name: "GNUPGHOME"
21+
value: "/home/jenkins/.gnupg"
2022
volumeMounts:
2123
- name: settings-xml
2224
mountPath: /home/jenkins/.m2/settings.xml
2325
subPath: settings.xml
2426
readOnly: true
27+
- name: toolchains-xml
28+
mountPath: /home/jenkins/.m2/toolchains.xml
29+
subPath: toolchains.xml
30+
readOnly: true
31+
- name: settings-security-xml
32+
mountPath: /home/jenkins/.m2/settings-security.xml
33+
subPath: settings-security.xml
34+
readOnly: true
2535
- name: m2-repo
2636
mountPath: /home/jenkins/.m2/repository
37+
- name: gnupg-vol
38+
mountPath: /home/jenkins/.gnupg
2739
resources:
2840
limits:
2941
memory: "4Gi"
@@ -38,27 +50,91 @@ spec:
3850
items:
3951
- key: settings.xml
4052
path: settings.xml
53+
- name: toolchains-xml
54+
configMap:
55+
name: m2-dir
56+
items:
57+
- key: toolchains.xml
58+
path: toolchains.xml
59+
- name: settings-security-xml
60+
secret:
61+
secretName: m2-secret-dir
62+
items:
63+
- key: settings-security.xml
64+
path: settings-security.xml
4165
- name: m2-repo
4266
emptyDir: {}
67+
- name: gnupg-vol
68+
emptyDir: {}
4369
"""
4470
}
4571
}
4672
stages {
47-
stage('Check') {
73+
// Verifies compliance with Google's Java Style Guide (cf.
74+
// https://eclipse.github.io/steady/contributor/#contribution-content-guidelines).
75+
stage('Verify Coding Style and REUSE compliance') {
4876
steps {
4977
container('maven') {
50-
sh 'mvn -P gradle -Dvulas.shared.m2Dir=/home/jenkins/agent/workspace -Dspring.standalone \
51-
-Dspotbugs.excludeFilterFile=findbugs-exclude.xml -Dspotbugs.includeFilterFile=findbugs-include.xml \
52-
-Dspotbugs.failOnError=true -DskipTests clean install com.github.spotbugs:spotbugs-maven-plugin:4.0.4:check'
78+
sh 'reuse lint'
79+
sh 'bash .travis/check_code_style.sh'
5380
}
5481
}
5582
}
56-
83+
// Verifies that the -javadoc and -sources artifacts can be generated (by enabling the
84+
// javadoc profile contained in three pom.xml files). Also verifies that the build
85+
// is reproducible, and that Spotbugs checks do not fail (cf.
86+
// https://eclipse.github.io/steady/contributor/#contribution-content-guidelines).
87+
stage('Create javadoc + sources, Verify Spotbugs and Reproducibility') {
88+
steps {
89+
container('maven') {
90+
sh 'mvn -B -e -P gradle,javadoc \
91+
-Dspring.standalone \
92+
-DskipTests \
93+
-Dvulas.shared.m2Dir=/home/jenkins/agent/workspace \
94+
-Dspotbugs.excludeFilterFile=findbugs-exclude.xml \
95+
-Dspotbugs.includeFilterFile=findbugs-include.xml \
96+
-Dspotbugs.failOnError=true \
97+
clean install com.github.spotbugs:spotbugs-maven-plugin:4.2.3:check'
98+
sh 'mvn -B -e -P gradle,javadoc \
99+
-Dspring.standalone \
100+
-DskipTests \
101+
-Dreference.repo=https://repo.maven.apache.org/maven2 \
102+
clean verify'
103+
sh 'cat target/root-*.buildinfo.compare'
104+
sh 'grep ko=0 target/root-*.buildinfo.compare' // Fail if JARs are different
105+
}
106+
}
107+
}
108+
// Verifies that all tests pass (except for expensive patch analyses).
57109
stage('Test') {
58110
steps {
59111
container('maven') {
60-
sh 'mvn -P gradle -Dvulas.shared.m2Dir=/home/jenkins/agent/workspace -Dspring.standalone \
61-
-Dit.test="!IT01_PatchAnalyzerIT, IT*, *IT, *ITCase" -DfailIfNoTests=false clean test'
112+
sh 'mvn -B -e -P gradle \
113+
-Dspring.standalone \
114+
-Dvulas.shared.m2Dir=/home/jenkins/agent/workspace \
115+
-Dit.test="!IT01_PatchAnalyzerIT,IT*,*IT" \
116+
-DfailIfNoTests=false \
117+
clean test'
118+
}
119+
}
120+
}
121+
// GPG signs all artifacts and deploys them on Maven Central. See here for
122+
// additional info: https://www.jenkins.io/doc/book/pipeline/syntax/,
123+
// https://wiki.eclipse.org/Jenkins
124+
stage('Release on Central') {
125+
// when { branch "sign-releases" }
126+
when { tag "release-*" }
127+
steps {
128+
container('maven') {
129+
echo "Branch [${env.BRANCH_NAME}], tag [${env.TAG_NAME}]"
130+
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
131+
sh 'gpg --batch --import "${KEYRING}"'
132+
sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
133+
}
134+
sh 'mvn -B -e -P gradle,javadoc,release \
135+
-Dspring.standalone \
136+
-DskipTests \
137+
clean deploy'
62138
}
63139
}
64140
}

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE.txt)
99
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
1010
[![Build Status](https://travis-ci.org/eclipse/steady.svg?branch=master)](https://travis-ci.org/eclipse/steady)
11-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.sap.research.security.vulas/plugin-maven/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.sap.research.security.vulas/plugin-maven)
11+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.eclipse.steady/plugin-maven/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.eclipse.steady/plugin-maven)
1212
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4202/badge)](https://bestpractices.coreinfrastructure.org/projects/4202)
1313
[![REUSE status](https://api.reuse.software/badge/github.com/eclipse/steady)](https://api.reuse.software/info/github.com/eclipse/steady)
1414

@@ -73,7 +73,6 @@ Due to the current lack of an authentication and authorization mechanism, it is
7373
Other limitations:
7474

7575
- Static and dynamic analyses are not implemented for Python
76-
- Static analysis for Java is only supported until Java 8
7776
- Java 9 multi-release archives are not supported (classes below `META-INF/versions` are simply ignored)
7877

7978
## Todo (upcoming changes)

cli-scanner/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
<parent>
2727
<groupId>org.eclipse.steady</groupId>
2828
<artifactId>root</artifactId>
29-
<version>3.2.0-SNAPSHOT</version>
29+
<version>3.2.1-SNAPSHOT</version>
3030
</parent>
3131
<artifactId>cli-scanner</artifactId>
3232
<packaging>jar</packaging>
3333

34-
<name>Command Line Interface</name>
35-
<description></description>
34+
<name>steady-cli-scanner</name>
35+
<description>Steady Command Line Interface</description>
3636

3737
<properties>
3838
<maven.deploy.skip>false</maven.deploy.skip>

docker/.env.sample

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Vulas
2-
VULAS_RELEASE=3.2.0-SNAPSHOT
1+
# Eclipse Steady
2+
VULAS_RELEASE=3.2.0
33
VULAS_ENV=prod
44

55
# *** MANDATORY SETTINGS ***
@@ -35,3 +35,6 @@ no_proxy=
3535

3636
# kb-importer update cron expression
3737
KB_IMPORTER_CRON=0 0 * * *
38+
KB_IMPORTER_STATEMENTS_FOLDER=statements
39+
KB_IMPORTER_STATEMENTS_REPO=https://github.com/sap/project-kb
40+
KB_IMPORTER_STATEMENTS_BRANCH=vulnerability-data

docker/Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM maven:3-jdk-8-alpine
1+
FROM maven:3-adoptopenjdk-11
22

33
LABEL maintainer="[email protected]"
44

@@ -7,15 +7,17 @@ WORKDIR /vulas
77
ARG http_proxy
88
ARG https_proxy
99

10-
RUN apk update && apk add ca-certificates wget && update-ca-certificates
10+
RUN apt-get update
1111

12-
RUN apk add --no-cache python3 git && \
13-
python3 -m ensurepip && \
14-
rm -r /usr/lib/python*/ensurepip && \
15-
pip3 install --upgrade pip setuptools && \
16-
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
17-
if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
18-
rm -r /root/.cache
12+
RUN apt-get install -y ca-certificates wget && update-ca-certificates
13+
14+
RUN apt-get install -y python3 python3-pip git
15+
16+
RUN python3 -m pip install --upgrade pip setuptools && \
17+
python3 -m pip install requests virtualenv
18+
19+
RUN if [ ! -e /usr/local/bin/pip ]; then ln -s pip3 /usr/local/bin/pip ; fi && \
20+
if [ ! -e /usr/bin/python ]; then ln -s python3 /usr/bin/python; fi
1921

2022
ENV ANT_OPTS="-Dhttp.proxyHost=${HTTP_PROXY_HOST} -Dhttp.proxyPort=${HTTP_PROXY_PORT}"
2123

docker/docker-compose.build.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2'
1+
version: '2.4'
22

33
services:
44
frontend-apps:
@@ -41,15 +41,6 @@ services:
4141
- VULAS_RELEASE=${VULAS_RELEASE}
4242
image: steady-rest-lib-utils:${VULAS_RELEASE}
4343

44-
patch-analyzer:
45-
build:
46-
context: ./patch-analyzer
47-
dockerfile: ./Dockerfile
48-
args:
49-
- VULAS_RELEASE=${VULAS_RELEASE}
50-
image: steady-patch-analyzer:${VULAS_RELEASE}
51-
entrypoint: /bin/sleep 1
52-
5344
kb-importer:
5445
build:
5546
context: ./kb-importer

docker/docker-compose.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '2'
1+
version: '2.4'
22

33
services:
44
frontend-apps:
@@ -25,7 +25,7 @@ services:
2525
container_name: steady-haproxy
2626
hostname: haproxy
2727
env_file: .env
28-
image: haproxy:alpine
28+
image: haproxy:2.3-alpine
2929
ports:
3030
- "8033:8080"
3131
- "8034:7070"
@@ -68,14 +68,14 @@ services:
6868
hostname: postgresql
6969
image: postgres:11-alpine
7070
environment:
71+
- POSTGRES_DB=vulas
7172
- POSTGRES_USER=${POSTGRES_USER}
7273
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
73-
- POSTGRES_DB=vulas
7474
- PGDATA=/var/lib/postgresql/data
7575
ports:
7676
- "8032:5432"
7777
volumes:
78-
- vulnerability-assessment-tool-postgres-data:/var/lib/postgresql/data
78+
- steady-postgres-data:/var/lib/postgresql/data
7979
- ./postgresql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
8080
security_opt:
8181
- no-new-privileges
@@ -93,6 +93,7 @@ services:
9393
environment:
9494
- DELAY_STARTUP=5
9595
- vulas.shared.cia.serviceUrl=http://cia:8092/cia
96+
- vulas.shared.cve.serviceUrl=https://services.nvd.nist.gov/rest/json/cve/1.0/<ID>
9697
- spring.datasource.username=${POSTGRES_USER}
9798
- spring.datasource.password=${POSTGRES_PASSWORD}
9899
links:
@@ -153,4 +154,4 @@ services:
153154
restart: always
154155

155156
volumes:
156-
vulnerability-assessment-tool-postgres-data:
157+
steady-postgres-data:

docker/kb-importer/Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
FROM openjdk:8-jre-alpine
1+
FROM openjdk:11-jre-slim
22

33
LABEL maintainer="[email protected]"
44

55
ARG VULAS_RELEASE
66

7-
RUN apk --no-cache add openssl wget tar git
7+
RUN apt-get update \
8+
&& apt-get install -y --no-install-recommends \
9+
openssl wget tar git cron bash gettext\
10+
&& rm -rf /var/lib/apt/lists/* \
11+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
12+
813
WORKDIR /kb-importer
9-
RUN wget https://github.com/SAP/project-kb/releases/download/v0.6.17/kaybee-0.6.17_linux-amd64 -O kaybee
14+
15+
RUN wget https://github.com/SAP/project-kb/releases/download/v0.6.18/kaybee-0.6.18_linux-amd64 -O kaybee
1016
RUN chmod +x kaybee
17+
1118
COPY kb-importer-$VULAS_RELEASE-jar-with-dependencies.jar kb-importer.jar
1219
RUN chmod +x kb-importer.jar
20+
1321
COPY kb-importer.sh start.sh /kb-importer/
22+
RUN chmod +x /kb-importer/kb-importer.sh /kb-importer/start.sh
23+
1424
ENTRYPOINT ["sh","/kb-importer/start.sh"]

0 commit comments

Comments
 (0)