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

remove more sensitive logs in pipeline/responseProcessor logs #2130

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

Zhangxunmt
Copy link
Collaborator

@Zhangxunmt Zhangxunmt commented Feb 19, 2024

Description

Pen testers still pointed out "Finding: Search Pipeline / Response Processor Logs Contains Sensitive Data" not resolved. This PR is to delete the leftovers in the sensitive logs required by the pen tests. #1965

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@@ -120,7 +120,6 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp
if (timeout == null || timeout == GenerativeQAParameters.SIZE_NULL_VALUE) {
timeout = DEFAULT_PROCESSOR_TIME_IN_SECONDS;
}
log.info("Timeout for this request: {} seconds.", timeout);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this should be treated as a sensitive information?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This one is not directly pointed out in the report but the timeout parameter is a configuration provided by customer in their pipeline. So to be on the safe side we should avoid logging it. Just in case this could be a follow-up in the next round.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't quite agree with the reason. But approving anyway as this is final hour....

Copy link
Collaborator

@HenryL27 HenryL27 left a comment

Choose a reason for hiding this comment

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

The system and user prompts are returned directly by just the GET search/pipeline endpoint - they're not meant to be secure. Those variables don't include any index or user data - basically just templates.
i.e. I don't think any of the GenerativeQAResponseProcessor log-deletions are necessary?
Approving but would like to keep these logs if possible

Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b162db) 81.86% compared to head (76fe28d) 81.86%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2130      +/-   ##
============================================
- Coverage     81.86%   81.86%   -0.01%     
- Complexity     5644     5659      +15     
============================================
  Files           543      543              
  Lines         22790    22843      +53     
  Branches       2333     2347      +14     
============================================
+ Hits          18658    18700      +42     
- Misses         3195     3203       +8     
- Partials        937      940       +3     
Flag Coverage Δ
ml-commons 81.86% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env February 19, 2024 20:00 — with GitHub Actions Inactive
@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env February 19, 2024 20:00 — with GitHub Actions Inactive
@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env February 19, 2024 20:00 — with GitHub Actions Inactive
@dhrubo-os dhrubo-os merged commit 896caac into opensearch-project:main Feb 19, 2024
11 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 19, 2024
Zhangxunmt added a commit that referenced this pull request Feb 19, 2024
…#2133)

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit 896caac)

Co-authored-by: Xun Zhang <[email protected]>
Zhangxunmt added a commit that referenced this pull request Feb 19, 2024
…#2132)

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit 896caac)

Co-authored-by: Xun Zhang <[email protected]>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants