Skip to content

Commit e27a18e

Browse files
authored
Feature/issue 353 (#382)
* configuration updates for issue 353 * fixed mispelling * added instructions, examples, and info in readme.md, edited docker.yml to include VulnerableApp- in release name
1 parent 02e6ca8 commit e27a18e

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

.github/workflows/docker.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,27 @@ jobs:
2020
uses: actions/checkout@v2
2121
with:
2222
java-version: 1.8
23+
fetch-depth: 0
24+
-
25+
name: Setup GitVersion action
26+
uses: gittools/actions/gitversion/setup@v0.9.7
27+
with:
28+
versionSpec: '5.x'
29+
-
30+
name: Execute GitVersion action
31+
id: gitversion
32+
uses: gittools/actions/gitversion/execute@v0.9.7
33+
-
34+
name: Publish release on GitHub
35+
uses: softprops/action-gh-release@v1
36+
with:
37+
name: 'VulnerableApp-${{ steps.gitversion.outputs.semver }}'
38+
tag_name: '${{ steps.gitversion.outputs.semver }}'
2339
-
2440
name: Grant execute permission for gradlew
2541
run: chmod +x gradlew
2642
-
2743
name: Build with Gradle and Push
28-
run: ./gradlew jib
44+
run: |
45+
./gradlew jib \
46+
-Djib.to.tags='latest',$GITVERSION_SEMVER

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,33 @@ There are multiple ways in which you can contribute to the project:
4040
1. If you are a developer and trying to start on to the project, then the suggestion is to go through the list of [issues](https://github.com/SasanLabs/VulnerableApp/issues) which contains `good first issue` which can be a good starter.
4141
2. If you are a developer or a security professional looking to add new Vulnerability type then you can Generate the Sample Vulnerability by running `./gradlew GenerateSampleVulnerability`. It will generate the Sample Vulnerability template which has placeholders and comments. Modified files can be seen in the logs of the command or in the github history. You can navigate to those files, fill in the placeholders and then build the project to see the effect of the changes.
4242
3. In case you are looking to contribute to the project by publicising it or working on the growth of the project, please feel free to add your thoughts to discussions section or issues and we can discuss over them.
43+
### Semantic Versioning ###
44+
Leveraging GitHub workflow and actions, semantic versioning is automated.
45+
When committing your feature, you have the option to increment the version's major, minor, or patch value
46+
by including <code>+semver:[major|minor|patch]</code> in your commit message. Major, minor, patch values are the
47+
strings 'major', 'minor', and 'patch'.
48+
49+
Examples:
50+
```properties
51+
git commit -m "some text +semver:major"
52+
git commit -m "+semver:minor some text"
53+
git commit -m "+semver:patch some text"
54+
```
55+
By default, if the version is not provided in the commit message, then patch is incremented.
56+
57+
The updated version is used to create a tag for the latest published release on GitHub and DockerHub.
58+
59+
<em>Which version should be incremented?</em>
60+
61+
<table>
62+
<thead><td>Version</td><td>Description</td></thead>
63+
<tr><td>Major</td><td>Changes that break backwards compatibility</td></tr>
64+
<tr><td>Minor</td><td>New features that are backwards compatible</td></tr>
65+
<tr><td>Patch</td><td>Bug fixes that are backwards compatible</td></tr>
66+
</table>
67+
More information can be found at <a href="https://semver.org/" alt="semantic versioning specification">Semantic
68+
Versioning
69+
Specifiction</a>.
4370

4471
## Building the project
4572
There are 2 ways in which this project can be built and used:

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jib {
6666
image = 'openjdk:8-jre-alpine'
6767
}
6868
to {
69-
image = 'sasanlabs/owasp-vulnerableapp:unreleased'
69+
image = 'sasanlabs/owasp-vulnerableapp'
7070
}
7171
}
7272

0 commit comments

Comments
 (0)