generated from kappsegla/maven-java-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Closes#95 #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Closes#95 #16
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
f416823
Create CI pipeline and mvn wrapper (#3)
fmazmz 2bb8152
add docker release workflow for publishing docker image to ghcr (#8)
fmazmz b86eb38
create initial DockerFile (#9)
fmazmz 1f93012
Feature/tcp serversocket #4 (#10)
met4lk1tty 70db6c7
chore: Update POM to Java 25 and rename artifactId/groupId (#11)
met4lk1tty bf031de
feature/HTTPparser (#12)
LinusWestling 06d3f0c
feature/ServerLogging (#22)
addee1 68b5341
update POM with pitest (#26)
met4lk1tty e0c324c
Add basic HTTP response support (#24)
addee1 019e4c4
Fix PiTest by defining argLine and removing invalid Mockito javaagent…
met4lk1tty 7815c6b
Rename SocketServer to Server Move HTTP request handling logic to a d…
johanbriger b0d7583
Add testing for ServerLogging.java. Configure ServerLogging.java for …
bamsemats 446b5e9
feature/FilterPlugin (#17)
LinusWestling 410ff28
Introduce ADR structure and first ADR - Add ADR README explaining the…
annikaholmqvist94 d6080ff
feat: make HttpResponse mutable and implement NotFoundPlugin default …
LinusWestling d9fa188
Implement static file handler (foundation for #18) (#36)
annikaholmqvist94 57f52cb
bump pom version for release (#57)
fmazmz b088497
Create release tag v1.0.0-beta (#58)
fmazmz 1ac03c5
Adds unit tests to HttpParser (#42)
simonforsberg 418f1ad
add application properties and a ConfigLoader to load set configurati…
fmazmz ef181c0
Feature/global filter (#51)
met4lk1tty fb5ae28
Add IP filter to request pipeline (#59)
HerrKanin 0d42601
Update websit to include nav bar, readme site and load content from r…
bamsemats 9823160
docs: centralize documentation into root README and remove package-le…
addee1 b716a70
Update to fix yaml error in pom and README.md content (#65)
bamsemats 48d88db
Feature/routing separate from plugin (#68)
bamsemats af32a5d
feat: add filter scope annotations (@Global, @Route) (#67)
met4lk1tty 3377579
Feat/testing the full image before publishing (#84)
TatjanaTrajkovic 7e5ce75
add .dockerignore to optimize and speed up Docker build (#86)
TatjanaTrajkovic 97381b0
Feature: Rate Limiting Filter (#83)
simonforsberg 46352c8
Add URL redirect filter (301/302) (#64)
annikaholmqvist94 eede595
bug: IOException due to non existant source mapping url (#80)
fmazmz 3d11a7c
implement securityheadersfilter to harden http responses (#91)
johanbriger f8c3809
Added LogContext and ServerLogFormatter, amended ServerLogging to use…
Tyreviel b8aa660
Minor change to ConnectionHandler to generate and set connection ID, …
Tyreviel 0863976
created a test, ConnectionIdLoggingTest, to verify that the connectio…
Tyreviel 2b4d97c
Updated LoggingFilterTest to check the java.util.logging.Logger inste…
Tyreviel be74d92
Updated LoggingFilterTest to check the java.util.logging.Logger inste…
Tyreviel 01ca9e9
Merge remote-tracking branch 'origin/connectionID' into connectionID
Tyreviel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| target/ | ||
| .git/ | ||
| .mvn/ | ||
| mvnw | ||
| mvnw.cmd | ||
| .editorconfig | ||
| .gitignore | ||
| *.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_style = space | ||
| indent_size = 4 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.yml] | ||
| indent_size = 2 | ||
|
|
||
| [*.yaml] | ||
| indent_size = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: CI Pipeline | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| pull_request: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup Java 25 | ||
| uses: actions/setup-java@v5.2.0 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '25' | ||
| cache: 'maven' | ||
|
|
||
| - name: Run tests | ||
| run: ./mvnw -B test | ||
|
|
||
| - name: Run spotless checks | ||
| run: ./mvnw -B spotless:check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Publish Docker Image | ||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| steps: | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v6.0.2 | ||
|
|
||
| - name: Setup QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
|
|
||
| - name: Setup Docker BuildX | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Login to GHCR | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Extract Docker metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/${{ github.repository_owner }}/project-webserver-juv25d | ||
| tags: type=ref,event=tag | ||
| labels: org.opencontainers.image.source=${{ github.repository }} | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| push: true | ||
| platforms: linux/amd64,linux/arm64 | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| target/ | ||
| /.idea/ | ||
| /META-INF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| wrapperVersion=3.3.4 | ||
| distributionType=only-script | ||
| distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| FROM maven:3.9-eclipse-temurin-25 AS build | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY pom.xml pom.xml | ||
| RUN mvn dependency:go-offline -B | ||
|
|
||
| COPY src ./src | ||
| RUN mvn clean package -DskipTests | ||
|
|
||
| FROM eclipse-temurin:25-jre-alpine | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # might need to update this later when we have our explicit class names | ||
| COPY --from=build /app/target/app.jar app.jar | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Container runs as root — add a non-root
USERdirectiveNo
USERinstruction is present in the runtime stage. The application process runs as root inside the container, meaning any exploit of the server grants root-level container access. Trivy rule DS-0002 flags this explicitly.🔒 Proposed fix — add a non-root user
🤖 Prompt for AI Agents