forked from rehmanmuradali/springboot-java8
-
Notifications
You must be signed in to change notification settings - Fork 1
feature: add CI workflow and security policy #82
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
Open
amitmanchella-cog
wants to merge
1
commit into
master
Choose a base branch
from
devin/1789139498-ci-and-security-policy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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,22 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: temurin | ||
| java-version: '8' | ||
| cache: maven | ||
|
|
||
| - name: Build and test | ||
| run: ./mvnw -B verify | ||
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,19 @@ | ||
| # Security Policy | ||
|
|
||
| ## Supported Versions | ||
|
|
||
| | Version | Supported | | ||
| | ------------------------ | ------------------ | | ||
| | `master` (0.1.0) | :white_check_mark: | | ||
| | Older releases/branches | :x: | | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| Please report security vulnerabilities **privately** through GitHub Security | ||
| Advisories: open the repository's **Security** tab and click | ||
| **"Report a vulnerability"**. | ||
|
|
||
| **Do not open public GitHub issues for security vulnerabilities.** | ||
|
|
||
| We aim to acknowledge and respond to vulnerability reports within | ||
| **5 business days**. |
Empty file.
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.
🟡 CI skips application compilation and tests
./mvnw -B verifyreports success without compiling application sources or running tests. Thepompackaging omits both phases from Maven's default lifecycle. Broken application changes can pass CI.Learn more
Maven binds compilation and test execution to the default lifecycle only for artifact packaging such as
jar. This project declarespompackaging, which represents an aggregator or parent project and has no Java compile or test bindings. The workflow therefore validates dependency resolution and the configured Spring Boot goal, but notsrc/main/javaor any futuresrc/test/javafiles.Example: A pull request can introduce invalid syntax in
TopicController.java. The new CI job still exits successfully because Maven never invokesmaven-compiler-pluginfor this project.Recommended fix: Change the project packaging to
jarso./mvnw -B verifyexercises the normal Java lifecycle, or run a build command that explicitly compiles and tests the application. Verify the corrected workflow fails for an intentionally uncompilable source change.Was this helpful? React with 👍 or 👎 to provide feedback.
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.
Confirmed and already called out in the PR description:
<packaging>pom</packaging>is pre-existing inpom.xml, soverifyonly runs the Spring Bootrepackagegoal. Changing the packaging tojaris a build-config change outside this PR's scope (CI workflow + SECURITY.md), so I've left it as-is and flagged it to the requester as a follow-up decision.