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

SOAR-6425 Trendmicro Deepsecurity Fix Memory Leak- Request Session #1012

Merged
merged 11 commits into from
Sep 28, 2021

Conversation

pmara-r7
Copy link
Contributor

Proposed Changes

Remove the requests library 'session' as it can cause memory leaks, per
psf/requests#4601
Could use the .close() method on the session, but that removes the only valuable functionality that request sessions provide, so changed to using normal get and post requests.

Description

Describe the proposed changes:

PR Requirements

Developers, verify you have completed the following items by checking them off:

Testing

Unit Tests

Review our documentation on generating and writing plugin unit tests

  • Unit tests written for any new or updated code

In-Product Tests

If you are an InsightConnect customer or have access to an InsightConnect instance, the following in-product tests should be done:

  • Screenshot of job output with the plugin changes
  • Screenshot of the changed connection, actions, or triggers input within the InsightConnect workflow builder

Style

Review the style guide

Functional Checklist

  • Work fully completed
  • Functional
    • Any new actions/triggers include JSON test files in the tests/ directory created with icon-plugin run -c sample $action > tests/$action.json
    • Tests should all pass unless it's a negative test. Negative tests have a naming convention of tests/$action_bad.json
    • Unsuccessful tests should fail by raising an exception causing the plugin to die and an object should be returned on successful test
    • Add functioning test results to PR, sanitize any output if necessary
      • Single action/trigger icon-plugin run -T tests/example.json --debug --jq
      • All actions/triggers shortcut icon-plugin run -T all --debug --jq (use PR format at end)
    • Add functioning run results to PR, sanitize any output if necessary
      • Single action/trigger icon-plugin run -R tests/example.json --debug --jq
      • All actions/triggers shortcut icon-plugin run -R all --debug --jq (use PR format at end)

Assessment

You must validate your work to reviewers:

  1. Run make validate and make sure everything passes
  2. Run the assessment tool: icon-plugin run -A -R all -T all. For single action validation: icon-plugin run -A -R tests/my_action.json -T tests/my_action.json
  3. Copy (icon-plugin ... | pbcopy) and paste the output in a new post on this PR
  4. Add required screenshots from the In-Product Tests section

@pmara-r7 pmara-r7 added Work in Progress 🚧 PR is in progress Do Not Merge ⛔ PR should not be merged labels Sep 21, 2021
@pmara-r7 pmara-r7 removed Work in Progress 🚧 PR is in progress Do Not Merge ⛔ PR should not be merged labels Sep 23, 2021
mberezin-r7
mberezin-r7 previously approved these changes Sep 24, 2021
default: ""
example: "42"
default: 0
example: 42
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct answer

@mberezin-r7 mberezin-r7 added the Needs 2nd Reviewer PR needs a second reviewer label Sep 27, 2021
@pmara-r7 pmara-r7 merged commit fb2bc2e into master Sep 28, 2021
@pmara-r7 pmara-r7 deleted the SOAR-6425-Remove-Sessions-Trendmicro branch September 28, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs 2nd Reviewer PR needs a second reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants