Skip to content

Conversation

@mbaluda
Copy link
Contributor

@mbaluda mbaluda commented Feb 5, 2024

  • Model event handler phases before and after.
  • Model and tests for the log-injection example in SAP-samples/cloud-cap-samples.
  • Add query help files.
  • Add query suites files.
  • Bump packages version.

@mbaluda mbaluda requested a review from knewbury01 February 5, 2024 17:40
@mbaluda mbaluda self-assigned this Feb 5, 2024
@mbaluda mbaluda enabled auto-merge February 5, 2024 20:59
@mbaluda mbaluda changed the title Event handler phases Log-injection improvements Feb 7, 2024
Copy link
Contributor

@knewbury01 knewbury01 left a comment

Choose a reason for hiding this comment

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

@mbaluda nice work! just a few small comments/questions at this point


const LOG = cds.log("nodejs");
LOG.info("test" + book);
LOG.info("test" + book); // Log injection alert

Check failure

Code scanning / CodeQL

Uncontrolled data in logging call

Log entry depends on a [user-provided value](1).
this.on('format', (req) => {
const cds2 = require ('@sap/cds/lib')
const LOG = cds2.log('cds.log')
const $ = req.data; LOG.info('format:', $) // Log injection alert

Check failure

Code scanning / CodeQL

Uncontrolled data in logging call

Log entry depends on a [user-provided value](1).
Copy link
Contributor

@knewbury01 knewbury01 left a comment

Choose a reason for hiding this comment

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

only one very tiny change! other than that looks great! @mbaluda

Copy link
Contributor

@knewbury01 knewbury01 left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@mbaluda mbaluda merged commit 19dd204 into main Feb 27, 2024
@mbaluda mbaluda deleted the mbaluda-cap branch February 27, 2024 15:42
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