Skip to content

Conversation

@mbaluda
Copy link
Contributor

@mbaluda mbaluda commented Aug 28, 2024

Adds 2 queries and related tests:

  • Broken XSJS authentication
  • Disabled XSJS CSRF protection

{
"exposed": false,
"prevent_xsrf": false,
"authentication": null

Check failure

Code scanning / CodeQL

Broken XSJS authentication

Authentication should not be disabled.
Comment on lines +1 to +4
{
"exposed": false,
"prevent_xsrf": true
} No newline at end of file

Check failure

Code scanning / CodeQL

Broken XSJS authentication

Authentication is missing from the configuration.
@@ -0,0 +1,18 @@
{
"welcomeFile": "index.html",
"authenticationMethod": "none",

Check failure

Code scanning / CodeQL

Broken XSJS authentication

Authentication should not be disabled.
{
"source": "/bad/(.*)",
"destination": "srv_api",
"csrfProtection": false,

Check failure

Code scanning / CodeQL

Disabled XSJS CSRF protection

CSRF vulnerability due to protection being disabled.
"source": "/bad/(.*)",
"destination": "srv_api",
"csrfProtection": false,
"authenticationType": "none"

Check failure

Code scanning / CodeQL

Broken XSJS authentication

Authentication should not be disabled.
@mbaluda mbaluda self-assigned this Aug 28, 2024
@mbaluda mbaluda requested a review from jeongsoolee09 August 28, 2024 20:59
```

## References

Copy link
Contributor

@jeongsoolee09 jeongsoolee09 Sep 3, 2024

Choose a reason for hiding this comment

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

A link to the documentation page about xs-app.json may be a useful addition: https://help.sap.com/docs/SAP_HANA_PLATFORM/4505d0bdaf4948449b7f7379d24d0f0d/5f77e58ec01b46f6b64ee1e2afe3ead7.html

Copy link
Contributor

@jeongsoolee09 jeongsoolee09 left a comment

Choose a reason for hiding this comment

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

We're off to a good start! I've left some thoughts here and there.

Comment on lines +1 to +4
{
"exposed": false,
"authentication": null
} No newline at end of file

Check failure

Code scanning / CodeQL

Disabled XSJS CSRF protection

CSRF protection is missing from the configuration.
Copy link
Contributor

@jeongsoolee09 jeongsoolee09 left a comment

Choose a reason for hiding this comment

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

:shipit:

@jeongsoolee09 jeongsoolee09 merged commit 4b2580a into main Sep 4, 2024
@jeongsoolee09 jeongsoolee09 deleted the mbaluda/xsjs-access branch September 4, 2024 18:13
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.

3 participants