Skip to content
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

WFPREV-145 API entity model #275

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open

WFPREV-145 API entity model #275

wants to merge 37 commits into from

Conversation

ssylver93
Copy link
Collaborator

No description provided.

Comment on lines +40 to +41
http
.csrf(AbstractHttpConfigurer::disable)

Check failure

Code scanning / CodeQL

Disabled Spring CSRF protection High test

CSRF vulnerability due to protection being disabled.

Copilot Autofix AI 7 days ago

To fix the problem, we need to enable CSRF protection in the securityFilterChain method. This can be done by removing the line that disables CSRF protection. This change ensures that the application is protected against CSRF attacks without altering the existing functionality.

Suggested changeset 1
server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/TestSpringSecurity.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/TestSpringSecurity.java b/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/TestSpringSecurity.java
--- a/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/TestSpringSecurity.java
+++ b/server/wfprev-api/src/test/java/ca/bc/gov/nrs/wfprev/TestSpringSecurity.java
@@ -40,3 +40,2 @@
         http
-        .csrf(AbstractHttpConfigurer::disable)
         .authorizeHttpRequests(auth -> auth
EOF
@@ -40,3 +40,2 @@
http
.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(auth -> auth
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignorable error, this is for the test config only

@dhlevi
Copy link
Contributor

dhlevi commented Nov 26, 2024

I merged a couple of changes I forgot to add, so this will need an update from the original PR, fyi

Copy link

sonarcloud bot commented Dec 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants