gipo999 / tomcat-webapp-boilerplate

https://gipo999.github.io/tomcat-webapp-boilerplate/
1 stars 1 forks source link

Quality gate

CodeQL Check Test Build Workflow CodeCov Publish Docker Image Workflow

Commitizen friendly Semantic-release: Commmitizen Active Development

Tomcat Webapp Boilerplate

Proof of concept for a tomcat webapp boilerplate with automated testing and security checks.

Many features are ported from https://github.com/gipo999/smispi, please refer to that repository for additional notes and documentation. Additional feats from that repo like pitest can be added to this one.

Features

Basics

Development

Git Hooks

Github Actions

Must be buildable and pass all checks with gradlew buildWar

Verifies the war is runnable with a health check http request on the container.

Vulnerability assessment actions:

Reports that won't generate a sarif are uploaded to github pages or are made available with custom actions at issues

note: issues, pr comments, gh pages are considered vulnerabilities since they expose information

Please check gh pages

Read more at Sarif Reports

Release

Uses commitizen for commit messages and automatically creates github tags+releases adding the WAR, javadoc and source code to the release at that point in time

Please check releases

Requires commits to be made following the commitizen format

Static code analyzers

Dynamic Application Security Testing (DAST)

Please check Alternative/Additions

Sarif Reports

Sarif reports can be uploaded to github with the upload-sarif action.

They provide a standard format for static analysis tools, and can be used in github security tab to have a better overview of the vulnerabilities and identify the tools that generated them.

Requires custom actions to parse bugged or missing sarif reports (zap, nmap, wapiti, snyk container).

Please check attack action for more info

Auto upload images

After a succesful release, the docker image is uploaded to dockerhub and github packages with tags latest, vX.Y.Z and sha

Env vars needed in github secrets

Additional Tools and references

References

https://owasp.org/www-community/Free_for_Open_Source_Application_Security_Tools

Alternatives/Additions

Considered Strongest, but paid

others

https://owasp.org/www-community/api_security_tools

https://nordicapis.com/api-vulnerability-scanners/

https://github.com/arainho/awesome-api-security

https://github.com/sbilly/awesome-security

https://github.com/okhosting/awesome-cyber-security

Free

https://github.com/topics/vulnerability-assessment

Other static analysis tools

https://github.com/eclipse/steady

Find out more

Check more notes/todos @ github project, issues

You can take a look at other branches (.bak, etc) for older versions or different approaches.

Every file has comments with implementation details

Github actions interesting links

Artifacts

https://github.com/actions/upload-artifact

Expressions

https://docs.github.com/en/actions/learn-github-actions/expressions

Summaries

https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/