Skip to content

Commit 21d0c52

Browse files
committed
Update pre-commit hooks
1 parent 635f1bc commit 21d0c52

Some content is hidden

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

45 files changed

+84
-87
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
4-
hooks:
5-
- id: trailing-whitespace
6-
- id: end-of-file-fixer
7-
- id: check-yaml
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
exclude: 2_supplychain/2_praxis/DemoApplication/app/src/main/resources/config/application.yml
9+
- id: check-added-large-files
10+
- id: detect-private-key

0_devops/1_theorie/Einführung.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,3 @@ DevOps ist aus der Erkenntnis entstanden, dass agile Methoden alleine nicht reic
9090
* [The DevOps Handbook](https://www.goodreads.com/book/show/26083308-the-devops-handbook)
9191
* [Accelerate – Forsgren et al.](https://www.goodreads.com/book/show/39080433-accelerate)
9292
* [The Phoenix Project – Kim et al.](https://www.goodreads.com/book/show/17255186-the-phoenix-project)
93-
94-

0_devops/2_praxis/ContinuousIntegration/Inhalte.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
- Install: Führt npm install im Verzeichnis der React-Anwendung aus
1414
- Lint: Führt npm run lint aus, um Code-Stil und -Qualität zu überprüfen
1515
- Test: Führt npm test aus, um sicherzustellen, dass Tests erfolgreich durchlaufen
16-
- Build: Führt npm run build aus, um die React-Anwendung zu erstellen
16+
- Build: Führt npm run build aus, um die React-Anwendung zu erstellen

1_security/1_theorie/SecurityAutomatisierung.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Security Tools für die CI-/CD-Pipeline
1818
![CICD Tooling](../99_assets/images/CICD_tools.png)
1919

20-
Eine beispielhafte Pipeline mit GitHub Actions ist in diesem [Projekt](https://github.com/andifalk/supply-chain-security) zu finden.
20+
Eine beispielhafte Pipeline mit GitHub Actions ist in diesem [Projekt](https://github.com/andifalk/supply-chain-security) zu finden.
2121

2222
* Code Reviews
2323

@@ -27,13 +27,13 @@ Eine beispielhafte Pipeline mit GitHub Actions ist in diesem [Projekt](https://g
2727
* Software Composition Analysis (SCA)
2828
![SCA](../99_assets/images/SCA.png)
2929

30-
30+
3131

3232
## Security Observability
3333

3434
Um jederzeit auskunftsfähig bezüglich der Sicherheit aller Anwendungen und Umgebungen zu sein werden entsprechende Protokollierungen und ein Monitoring benötigt.
3535

36-
Heute moderne Observability Systeme beinhalten meist ein SIEM (Security Information and Event System).
36+
Heute moderne Observability Systeme beinhalten meist ein SIEM (Security Information and Event System).
3737
Mit diesem werden alle damit verbundenen Logs, Metriken und Ereignisse verknüpft so dass das SIEM mit Hilfe von Künstlicher Intelligenz und Machine Learning automatisiert Angriffspatterns erkennen kann. Darüber hinaus sind damit dann auch (semi-)automatische Reaktionsmöglichkeiten verbunden.
3838

3939
![SIEM](../99_assets/images/siem.png)

1_security/1_theorie/SecurityKultur.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
- Interne Botschafter: Ausgewählte Mitarbeiter fördern die Security Kultur intern.
1212
- Experten und Ressourcen: Unterstützen Teams als Sicherheitsexperten und Ressourcen.
1313

14-
![Security Champions](../99_assets/images/security_champions.png)
14+
![Security Champions](../99_assets/images/security_champions.png)

1_security/1_theorie/ÜbersichtSecInDevOps.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Die wesentlichen Teile eines SDLC (SOftware Development Lifecycle) sind in der n
1111
![Secure Software Development Lifecycle](../99_assets/images/secure_software_development_lifecycle.png)
1212

1313

14-
### Reifegradanalysen
14+
### Reifegradanalysen
1515

1616
Mittels [OWASP SAMM (Software Assurance Maturity Model)](https://owaspsamm.org/about/) kann ein vorhandener SDLC messbar bewertet werden inwieweit hier die Sicherheit integriert ist.
1717
Aus den Ergebnissen können dann konkrete Handlungsempfehlungen zur Verbesserung der Sicherheit für alle Phasen des SDLC abgeleitet und umgesetzt werden.
@@ -43,8 +43,8 @@ Ein Datenflussdiagramm ist aus sehr einfachen Elementen aufgebaut, die in der na
4343

4444
### Application Security Verification Standard (OWASP)
4545

46-
Mit Hilfe von [ASVS](https://github.com/OWASP/ASVS/tree/v5.0.0/5.0/en) bekommt man einen umfassenden Katalog immer wieder relevanten Anforderungen für Security an die Hand.
47-
Je nach erforderlichem Sicherheitslevel sollten die in diesem Guide aufgeführten Anforderungen von typischen Anwendungen erfüllt werden.
46+
Mit Hilfe von [ASVS](https://github.com/OWASP/ASVS/tree/v5.0.0/5.0/en) bekommt man einen umfassenden Katalog immer wieder relevanten Anforderungen für Security an die Hand.
47+
Je nach erforderlichem Sicherheitslevel sollten die in diesem Guide aufgeführten Anforderungen von typischen Anwendungen erfüllt werden.
4848

4949
Die meisten aufgeführten Anforderungen können durch automatisierte Tests anhand der aufgeführten Akzeptanzkriterien abgedeckt werden.
5050

@@ -86,4 +86,4 @@ Inzwischen ist ASVS in Version 5.0 angelangt. Hier wurden insbesondere neue Anfo
8686

8787
* [OWASP Websecurity Testing Guide](https://owasp.org/www-project-web-security-testing-guide)
8888

89-
* [OWASP Security-C4PO Anwendung](https://owasp.org/www-project-security-c4po/)
89+
* [OWASP Security-C4PO Anwendung](https://owasp.org/www-project-security-c4po/)

1_security/2_praxis/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Security Demos
22

33

4-
- [Secure Single Page Applications](https://github.com/andifalk/secure-spa)
5-
- [Bookmark Service Application](https://github.com/andifalk/bookmark-service)
6-
- [API Security](https://github.com/andifalk/api-security)
7-
- [Supply Chain Security](https://github.com/andifalk/supply-chain-security)
4+
- [Secure Single Page Applications](https://github.com/andifalk/secure-spa)
5+
- [Bookmark Service Application](https://github.com/andifalk/bookmark-service)
6+
- [API Security](https://github.com/andifalk/api-security)
7+
- [Supply Chain Security](https://github.com/andifalk/supply-chain-security)

1_security/2_praxis/security-testing-demos/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The security tests include the following types:
3838
* Security Architecture Tests (using [ArchUnit](https://www.archunit.org/))
3939
* Input Validation Tests
4040
* Broken Authentication Tests
41-
* Integration Test Layer
41+
* Integration Test Layer
4242
* Security Misconfiguration Tests
4343
* Injection (SQL Injection) Tests
4444
* Broken Access Control Tests
@@ -54,7 +54,7 @@ To check the project with the OSS semgrep scanner just perform this command insi
5454
```shell
5555
semgrep scan --config auto
5656
```
57-
57+
5858
#### SonarQube
5959

6060
To use SonarQube for security analysis the easiest way is the provided docker container.
@@ -63,11 +63,10 @@ Just follow the [Getting Started Guide](https://docs.sonarqube.org/latest/setup/
6363
After you have configured the project in SonarQube you can trigger the project analysis by issuing the following command:
6464

6565
```
66-
./mvnw sonar:sonar -Dsonar.projectKey=PROJECT_KEY
67-
-Dsonar.projectName='PROJECT_NAME'
68-
-Dsonar.host.url=http://localhost:8085
69-
-Dsonar.token=THE_GENERATED_TOKEN
66+
./mvnw sonar:sonar -Dsonar.projectKey=PROJECT_KEY
67+
-Dsonar.projectName='PROJECT_NAME'
68+
-Dsonar.host.url=http://localhost:8085
69+
-Dsonar.token=THE_GENERATED_TOKEN
7070
```
7171

7272
Please replace _PROJECT_KEY_ and _PROJECT_TOKEN_ with your own values.
73-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
./mvnw sonar:sonar -Dsonar.projectKey=bookmarks \
22
-Dsonar.projectName='Bookmarks' \
33
-Dsonar.host.url=http://localhost:8085 \
4-
-Dsonar.token=sqa_c23fdc9cbb471e837ef2b0ce50e060466379ee6b
4+
-Dsonar.token=sqa_c23fdc9cbb471e837ef2b0ce50e060466379ee6b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"openapi":"3.0.1","info":{"title":"Bookmark-API","version":"1"},"servers":[{"url":"http://localhost:9090","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/users":{"get":{"tags":["User-API"],"summary":"Retrieves list of users","operationId":"findAllUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"tags":["User-API"],"summary":"Register new user","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/users/{userid}/changepassword":{"post":{"tags":["User-API"],"summary":"Change current password of user","operationId":"changePassword","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/bookmarks":{"get":{"tags":["Bookmark-API"],"summary":"Retrieves list of bookmarks for given user","operationId":"findAllBookmarks","parameters":[{"name":"userid","in":"query","description":"The identifier of the user","required":true,"schema":{"type":"string"},"example":"c9caa4d1-5ad7-4dd1-8bd1-91b8bc5b9a48"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"post":{"tags":["Bookmark-API"],"summary":"Creates a new bookmark for given user","operationId":"createBookmark","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"/api/bookmarks/upload":{"post":{"tags":["Bookmark-API"],"summary":"Uploads bookmarks inside an excel sheet","operationId":"uploadBookmarks","requestBody":{"content":{"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/users/{userid}":{"get":{"tags":["User-API"],"summary":"Get user specified by identifier","operationId":"getUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"delete":{"tags":["User-API"],"summary":"Delete user specified by identifier","operationId":"deleteUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/users/me":{"get":{"tags":["User-API"],"summary":"Get current authenticated user","operationId":"currentUser","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/bookmarks/search":{"get":{"tags":["Bookmark-API"],"summary":"Searches bookmarks by name","operationId":"searchBookmarks","parameters":[{"name":"name","in":"query","description":"The name of the bookmarks to be searched for","required":true,"schema":{"type":"string"},"example":"Ama"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/bookmarks/{bookmarkId}":{"delete":{"tags":["Bookmark-API"],"summary":"Deletes an existing bookmark by its identifier","operationId":"deleteBookmark","parameters":[{"name":"bookmarkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"identifier":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"username":{"type":"string"}}},"ChangePasswordRequest":{"type":"object","properties":{"oldPassword":{"type":"string"},"newPassword":{"type":"string"}}},"Bookmark":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"url":{"type":"string"},"userIdentifier":{"type":"string"}}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}}}
1+
{"openapi":"3.0.1","info":{"title":"Bookmark-API","version":"1"},"servers":[{"url":"http://localhost:9090","description":"Generated server url"}],"security":[{"basicAuth":[]}],"paths":{"/api/users":{"get":{"tags":["User-API"],"summary":"Retrieves list of users","operationId":"findAllUsers","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"post":{"tags":["User-API"],"summary":"Register new user","operationId":"registerUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/users/{userid}/changepassword":{"post":{"tags":["User-API"],"summary":"Change current password of user","operationId":"changePassword","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/bookmarks":{"get":{"tags":["Bookmark-API"],"summary":"Retrieves list of bookmarks for given user","operationId":"findAllBookmarks","parameters":[{"name":"userid","in":"query","description":"The identifier of the user","required":true,"schema":{"type":"string"},"example":"c9caa4d1-5ad7-4dd1-8bd1-91b8bc5b9a48"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"post":{"tags":["Bookmark-API"],"summary":"Creates a new bookmark for given user","operationId":"createBookmark","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Bookmark"}}}}}}},"/api/bookmarks/upload":{"post":{"tags":["Bookmark-API"],"summary":"Uploads bookmarks inside an excel sheet","operationId":"uploadBookmarks","requestBody":{"content":{"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/users/{userid}":{"get":{"tags":["User-API"],"summary":"Get user specified by identifier","operationId":"getUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}},"delete":{"tags":["User-API"],"summary":"Delete user specified by identifier","operationId":"deleteUser","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}},"/api/users/me":{"get":{"tags":["User-API"],"summary":"Get current authenticated user","operationId":"currentUser","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/bookmarks/search":{"get":{"tags":["Bookmark-API"],"summary":"Searches bookmarks by name","operationId":"searchBookmarks","parameters":[{"name":"name","in":"query","description":"The name of the bookmarks to be searched for","required":true,"schema":{"type":"string"},"example":"Ama"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"}}}}}}}},"/api/bookmarks/{bookmarkId}":{"delete":{"tags":["Bookmark-API"],"summary":"Deletes an existing bookmark by its identifier","operationId":"deleteBookmark","parameters":[{"name":"bookmarkId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}}}}},"components":{"schemas":{"User":{"type":"object","properties":{"identifier":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"password":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"username":{"type":"string"}}},"ChangePasswordRequest":{"type":"object","properties":{"oldPassword":{"type":"string"},"newPassword":{"type":"string"}}},"Bookmark":{"type":"object","properties":{"identifier":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"url":{"type":"string"},"userIdentifier":{"type":"string"}}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}}}

0 commit comments

Comments
 (0)