Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit b415777

Browse files
committed
Merge branch 'master' into update-docker-image-group
2 parents e4861ef + a68b475 commit b415777

File tree

126 files changed

+3392
-532
lines changed

Some content is hidden

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

126 files changed

+3392
-532
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
2+
name: "🐞 Bug report"
3+
about: Please create a bug report if you encouter any project specific issue.
4+
labels: bug
45

56
---
7+
<!--
8+
Thank you for reporting an issue in our project 🙌
9+
10+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
11+
-->
612

713
**Describe the bug**
8-
A clear and concise description of what the bug is.
14+
<!-- A clear and concise description of what the bug is. -->
915

1016
**To Reproduce**
17+
<!--
1118
Steps to reproduce the behavior:
1219
1. Go to '...'
1320
2. Click on '....'
1421
3. Scroll down to '....'
1522
4. See error
23+
-->
1624

1725
**Expected behavior**
18-
A clear and concise description of what you expected to happen.
26+
<!-- A clear and concise description of what you expected to happen. -->
1927

2028

2129
**System (please complete the following information):**
30+
<!--
31+
- secureCodeBox Version/Release
2232
- OS: [e.g. iOS]
33+
- Kubernetes Version [command: `kubectl version`]
2334
- Docker Version [command: `docker -v`]
24-
- Docker Compose Version [command: `docker-compose -v`]
25-
- Browser [e.g. chrome, safari]
35+
- Browser [e.g. chrome, safari, firefox,...]
36+
-->
2637

2738
**Screenshots / Logs**
28-
If applicable, add screenshots to help explain your problem.
39+
<!-- If applicable, add screenshots to help explain your problem. -->
2940

3041
**Additional context**
31-
Add any other context about the problem here.
42+
<!-- Add any other context about the problem here. -->
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: "📚 Documentation Issue"
3+
about: "Did you come across parts of our documentation that should be fixed?"
4+
labels: documentation
5+
6+
---
7+
<!--
8+
Thank you for reporting an issue in our documentation 🙌
9+
10+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
11+
-->
12+
13+
## Where to find the issue
14+
<!-- Be as specific as possible by naming the document, page, and ideally paragraph. -->
15+
16+
## Describe the issue
17+
<!-- Please let us know what exactly is the issue with that part of the documentation -->
18+
19+
## Suggested change
20+
<!-- If you have ideas on how to fix this issue, please note them here, or consider creating a Pull Request -->
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
2+
name: "Feature request"
3+
about: "Suggest an idea for this project"
44

55
---
6+
<!--
7+
Thank you for reporting an issue in our documentation 🙌
8+
9+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
10+
-->
611

712
**Is your feature request related to a problem? Please describe.**
8-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
914

1015
**Describe the solution you'd like**
11-
A clear and concise description of what you want to happen.
16+
<!-- A clear and concise description of what you want to happen. -->
1217

1318
**Describe alternatives you've considered**
14-
A clear and concise description of any alternative solutions or features you've considered.
19+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1520

1621
**Additional context**
17-
Add any other context or screenshots about the feature request here.
22+
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/new_hook.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: '⚓️ New Hook request'
3+
about: 'Suggest an idea for a new data processing or integration hook in this project.'
4+
labels: 'hook'
5+
---
6+
7+
<!--
8+
Thank you for contributing to our project 🙌
9+
10+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. Also, please, have a look at our FAQs and existing questions before opening a new question.
11+
-->
12+
13+
## New Hook implementation request
14+
15+
**Is your feature request related to a problem? Please describe.**
16+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
17+
18+
**Describe the solution you'd like**
19+
<!-- A clear and concise description of what you want to happen. -->
20+
21+
**Describe alternatives you've considered**
22+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
23+
24+
**Additional context**
25+
<!-- Add any other context or screenshots about the feature request here. -->
26+
27+
## Steps to implement a new Hook
28+
<!--
29+
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/docs/developer-guide)
30+
-->
31+
32+
- [ ] Create a new folder with the name of the [hook here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/hooks)
33+
- [ ] Add a README and give a brief overview of the scanner and its configuration options.
34+
- [ ] Add (optional) a Dockerfile for the scanner if there is no existing one publicly available on dockerHub
35+
- [ ] Use the [Hook-SDK](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/hook-sdk) to implement a new hook (currently based on NodeJS)
36+
- [ ] Add unit tests with at minimum 80% test coverage
37+
- [ ] Add some example scan.yaml and finding.yaml files in the example folder
38+
- [ ] Implement a new integration test for the hook [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/tests/integration)
Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
---
2-
name: 'New Security Scanner request'
2+
name: '🚓 New Security Scanner request'
33
about: 'Suggest an idea for a new security scanner to integrate in this project.'
4-
labels: 'security scanner'
4+
labels: 'scanner'
55
---
6+
7+
<!--
8+
Thank you for contributing to our project 🙌
9+
10+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. Also, please, have a look at our FAQs and existing questions before opening a new question.
11+
-->
12+
613
## New Scanner implementation request
714

815
**Is your feature request related to a problem? Please describe.**
9-
- _A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]_
16+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1017

1118
**Describe the solution you'd like**
12-
- _A clear and concise description of what you want to happen._
19+
<!-- A clear and concise description of what you want to happen. -->
1320

1421
**Describe alternatives you've considered**
15-
- _A clear and concise description of any alternative solutions or features you've considered._
22+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1623

1724
**Additional context**
18-
- _Add any other context or screenshots about the feature request here._
25+
<!-- Add any other context or screenshots about the feature request here. -->
1926

2027
## Steps to implement a new scanner
21-
> Hint: A general guide how to implement a new scanner is documented [here]( https://github.com/secureCodeBox/secureCodeBox/blob/master/docs/developer-guide/README.md#developing-own-processes)
22-
23-
### Must have
24-
- [ ] Create a [new public secureCodeBox repository](https://github.com/organizations/secureCodeBox/repositories/new) for the scanner implementation
25-
- [ ] Implement a new scanner microservice an reuse some of the existing stuff, if possible
26-
- [ ] Check if there is a [healthcheck](https://github.com/secureCodeBox/secureCodeBox/blob/master/docs/developer-guide/README.md#healthchecks-for-scanner-microservices) for the microservice implemented
27-
- [ ] Implement a [new basic security process](https://github.com/secureCodeBox/secureCodeBox/blob/master/docs/developer-guide/README.md#developing-a-process-model) for the scanner
28-
- [ ] Update the [docker-compose](https://github.com/secureCodeBox/secureCodeBox/blob/master/docker-compose.yml) files and integrate your new scanner there
29-
- [ ] Update the [user guide](https://github.com/secureCodeBox/secureCodeBox/tree/master/docs/user-guide) and [developer guide](https://github.com/secureCodeBox/secureCodeBox/tree/master/docs/developer-guide)
30-
- [ ] Implement a integration test for the scanner [here](https://github.com/secureCodeBox/secureCodeBox/tree/master/test)
31-
32-
### Should have
33-
- [ ] Update the [CLI examples](https://github.com/secureCodeBox/secureCodeBox/tree/master/cli)
34-
- [ ] Update the [Jenkins Pipeline](https://github.com/secureCodeBox/integration-pipeline-jenkins-examples) examples
35-
- [ ] Update the [OpenShift Container Setup](https://github.com/secureCodeBox/ansible-role-securecodebox-openshift)
28+
<!--
29+
Hint: A general guide how to implement a new scanner is documented [here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/docs/developer-guide)
30+
-->
31+
32+
- [ ] Create a new folder with the name of the [scanner here](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/scanners)
33+
- [ ] Add a README.md and give a brief overview of the scanner and its configuration options.
34+
- [ ] Implement a new scanner specific scan-type.yaml
35+
- [ ] Implement a new scanner specific parse-definition.yaml
36+
- [ ] Add (optional) some cascading-rules.yaml
37+
- [ ] Add (optional) a Dockerfile for the scanner if there is no existing one publicly available on dockerHub
38+
- [ ] Use the [parser-SDK](https://github.com/secureCodeBox/secureCodeBox-v2/tree/master/parser-sdk) to implement a new findings parser (currently based on NodeJS)
39+
- [ ] Add unit tests with at minimum 80% test coverage

.github/ISSUE_TEMPLATE/question.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "🤨 Question"
3+
about: "If you have *specific* questions about the project, please post them here."
4+
labels: question
5+
6+
---
7+
<!--
8+
Thank you for supporting our project 🙌
9+
10+
Before opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead. Also, please, have a look at our FAQs and existing questions before opening a new question.
11+
-->
12+
13+
## Your Question
14+
<!-- Include details about your question. -->

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
Thank you for your contribution to our Project 🙌
3+
4+
Before submitting your Pull Request, please take the time to check the points below and provide some descriptive information.
5+
* [ ] If this PR comes from a fork, please [Allow edits from maintainers](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork)
6+
* [ ] Set a meaningful title. Format: {task_name} (closes #{issue_number}). For example: Use logger (closes #41)
7+
* [ ] [Link your Pull Request to an issue](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) (if applicable)
8+
* [ ] Create Draft pull requests if you need clarification or an explicit review before you can continue your work item.
9+
* [ ] Make sure that your PR is not introducing _unncessary_ reformatting (e.g., introduced by on-save hooks in your IDE)
10+
* [ ] Make sure each new source file you add has a correct license header.
11+
-->
12+
13+
## Checklist
14+
15+
* [ ] Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
16+
* [ ] Make sure `npm test` runs for the whole project.
17+
18+
## Description
19+
20+
<!-- Please be brief in describing which issue is solved by your PR or which enhancement it brings -->

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: "Run tests & publish code coverage"
4848
uses: paambaati/codeclimate-action@v2.6.0
4949
env:
50-
CC_TEST_REPORTER_ID: 80b305e484240da8cecbd1d017dfb365d3ee7f4508b5ed8fd9e9348efd286406
50+
CC_TEST_REPORTER_ID: 545b7af20f13dc58a3284275828532a26d89a8e90c8f276fb54a23d78bae7a19
5151
with:
5252
coverageCommand: npm test -- --ci --colors --coverage
5353
operator:

.github/workflows/helm-charts.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,51 @@ jobs:
1111
- name: "Install yq"
1212
run: |
1313
sudo snap install yq
14-
- name: Parse Tag
14+
- name: Parse Tag
1515
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
16-
- name: "Publish Helm Chart"
16+
- name: "Publish Helm3 Charts"
1717
env:
1818
HELM_REGISTRY: https://charts.securecodebox.io
1919
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
2020
PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }}
2121
run: |
22-
# Publish charts in all folders containing a `Chart.yaml` file
22+
# Publish all helm3 charts in all folders containing a `Chart.yaml` file
2323
# https://github.com/koalaman/shellcheck/wiki/SC2044
2424
find . -type f -name Chart.yaml -print0 | while IFS= read -r -d '' chart; do
2525
(
2626
dir="$(dirname "${chart}")"
2727
cd "${dir}" || exit
28-
echo "Processing Chart in $dir"
28+
echo "Processing Helm3 Chart in $dir"
2929
helm package --version $RELEASE_VERSION .
3030
NAME=$(yq read - name < Chart.yaml)
3131
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
3232
)
33-
done
33+
done
34+
- name: "Publish Helm2 Charts"
35+
env:
36+
HELM_REGISTRY: https://charts-helm2.securecodebox.io
37+
USERNAME: ${{ secrets.HELM_REGISTRY_USERNAME }}
38+
PASSWORD: ${{ secrets.HELM_REGISTRY_PASSWORD }}
39+
run: |
40+
# Publish all helm2 charts in all folders containing a `helm2.Chart.yaml` file
41+
# https://github.com/koalaman/shellcheck/wiki/SC2044
42+
find . -type f -name helm2.Chart.yaml -print0 | while IFS= read -r -d '' chart; do
43+
(
44+
dir="$(dirname "${chart}")"
45+
cd "${dir}" || exit
46+
mv Chart.yaml helm3.Chart.yaml
47+
mv helm2.Chart.yaml Chart.yaml
48+
if [ "$(basename "$PWD")" = "operator" ]
49+
then
50+
echo "Copying CRDS to templates folder, as helm2 doesn't have native crds support."
51+
cp -R crds templates/crds
52+
fi
53+
echo "Restoring Helm2 Chart and replace Helm3 Chart temporary"
54+
[ ! -f helm2.requirements.lock ] || mv helm2.requirements.lock requirements.lock
55+
[ ! -f helm2.requirements.yaml ] || mv helm2.requirements.yaml requirements.yaml
56+
echo "Processing Helm2 Chart in $dir"
57+
helm package --version $RELEASE_VERSION .
58+
NAME=$(yq read - name < Chart.yaml)
59+
curl --silent --show-error --user "${USERNAME}:${PASSWORD}" --data-binary "@${NAME}-${RELEASE_VERSION}.tgz" "${HELM_REGISTRY}/api/charts"
60+
)
61+
done

.github/workflows/helm-docs.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update Helm Docs"
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
helm-docs:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- name: Download Helm Docs
16+
run: |
17+
mkdir helm-docs
18+
cd helm-docs
19+
20+
curl --output helm-docs.tar.gz --location https://github.com/norwoodj/helm-docs/releases/download/v0.15.0/helm-docs_0.15.0_Linux_x86_64.tar.gz
21+
tar -xvf helm-docs.tar.gz
22+
# Verify install
23+
./helm-docs --version
24+
25+
- name: Generate Helm Docs
26+
run: |
27+
./helm-docs/helm-docs
28+
# Remove helm-docs download to ensure they dont get commited back
29+
rm -rf helm-docs
30+
- uses: stefanzweifel/git-auto-commit-action@v4.5.1
31+
with:
32+
commit_message: Updating Helm Docs

0 commit comments

Comments
 (0)