Skip to content

Commit e31cbcf

Browse files
Merge pull request #35 from BorderTech/feature-owasp-proxy
OWASP properties
2 parents 483c750 + c05f5b6 commit e31cbcf

File tree

3 files changed

+16
-33
lines changed

3 files changed

+16
-33
lines changed

README.md

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,38 +40,14 @@ Projects using this must ensure the necessary POM sections are overriden - these
4040

4141
Once you have configured your project and environment you can release to Maven Central. It may look a little something like the examples below.
4242

43-
### Example Releasing
44-
The golden rule is ALWAYS do this on a separate branch (it makes [backing out](https://github.com/BorderTech/java-common/wiki/Releasing#dealing-with-failure) much easier when problems arise).
43+
### Releasing
44+
The golden rule is ALWAYS do the release on a separate branch (it makes [backing out](https://github.com/BorderTech/java-common/wiki/Releasing#dealing-with-failure) much easier when problems arise).
4545

46-
```bash
47-
# make sure you are on the main/default branch
48-
git checkout master # or "git checkout bobbie" etc
46+
Full documentation is available in the wiki under [Releasing](https://github.com/BorderTech/java-common/wiki/Releasing).
4947

50-
# fetch latest changes from main repository
51-
git fetch origin # or "git fetch upstream" if you are on a fork
48+
It is recommended projects use [gitflow with pull requests](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) model (ie feature, develop, release, master, hotfix branch paradigm).
5249

53-
# ensure local branch is up-to-date
54-
git merge origin/master # or "git merge upstream/master" or "git merge upstream/bobbie" etc
55-
56-
# create a new release branch (you could skip this step if it already exists which it probably shouldn't)
57-
git branch release-xyz # "git branch release-123" etc
58-
59-
# switch to release branch
60-
git checkout release-xyz # "git checkout !$" is easier :)
61-
62-
# perform the release
63-
mvn release:clean release:prepare release:perform -Psonatype-oss-release
64-
```
65-
66-
or to skip tests while releasing add `-Darguments="-DskipTests"`:
67-
68-
```
69-
mvn release:clean release:prepare release:perform -Psonatype-oss-release -Darguments="-DskipTests"
70-
```
71-
72-
73-
Full documentation is available in the wiki under [Releasing](https://github.com/BorderTech/java-common/wiki/Releasing)
50+
More details on the pull request pattern are available [here](https://blog.axosoft.com/pull-requests-gitflow/).
7451

7552
## build-tools
7653
This is primarily a shared resources module used by qa-parent and potentially other BorderTech maven modules.
77-

build-tools/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>com.github.bordertech.common</groupId>
88
<artifactId>bordertech-parent</artifactId>
99
<version>1.0.11-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>build-tools</artifactId>

qa-parent/pom.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<groupId>com.github.bordertech.common</groupId>
88
<artifactId>bordertech-parent</artifactId>
99
<version>1.0.11-SNAPSHOT</version>
10+
<relativePath>../pom.xml</relativePath>
1011
</parent>
1112

1213
<artifactId>qa-parent</artifactId>
@@ -39,9 +40,13 @@
3940
<bt.spotbugs.threshold>Medium</bt.spotbugs.threshold>
4041

4142
<!-- OWASP dependency vulnerability scanner -->
42-
<!-- allow for proxy settings -->
43-
<bt.owasp.dependency-check.proxy />
4443
<bt.owasp.skip>false</bt.owasp.skip>
44+
<!-- Min cvss score to fail on. Range 0-10 : LOW: 0-3.9, MEDIUM: 4-6.9, HIGH: 7.0-8.9, Critical: 9.0-10.0 -->
45+
<bt.owasp.fail.cvss.min>0</bt.owasp.fail.cvss.min>
46+
<!-- If true, override min cvss and fail on any vulnerability. -->
47+
<bt.owasp.fail.any>false</bt.owasp.fail.any>
48+
<!-- If set, owasp uses the proxy id in maven settings to download its db. -->
49+
<bt.owasp.proxy.id/>
4550
</properties>
4651

4752
<description>
@@ -268,8 +273,9 @@
268273
<artifactId>dependency-check-maven</artifactId>
269274
<version>4.0.2</version>
270275
<configuration>
271-
<failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
272-
<mavenSettingsProxyId>${bt.owasp.dependency-check.proxy}</mavenSettingsProxyId>
276+
<failBuildOnCVSS>${bt.owasp.fail.cvss.min}</failBuildOnCVSS>
277+
<failBuildOnAnyVulnerability>${bt.owasp.fail.any}</failBuildOnAnyVulnerability>
278+
<mavenSettingsProxyId>${bt.owasp.proxy.id}</mavenSettingsProxyId>
273279
<retireJsAnalyzerEnabled>false</retireJsAnalyzerEnabled><!-- see https://github.com/jeremylong/DependencyCheck/issues/1467 before turning this on -->
274280
<nspAnalyzerEnabled>false</nspAnalyzerEnabled>
275281
<nuspecAnalyzerEnabled>false</nuspecAnalyzerEnabled>

0 commit comments

Comments
 (0)