Skip to content

[PLGN-634] InsightVM - Asset Search | JsonDecode Error#2185

Merged
cmcnally-r7 merged 3 commits intodevelopfrom
PLGN-634-IVM-Asset_Search_Malformed_Json
Dec 13, 2023
Merged

[PLGN-634] InsightVM - Asset Search | JsonDecode Error#2185
cmcnally-r7 merged 3 commits intodevelopfrom
PLGN-634-IVM-Asset_Search_Malformed_Json

Conversation

@cmcnally-r7
Copy link
Copy Markdown
Contributor

Proposed Changes

Description

Describe the proposed changes:

  • Investigate and fix a customer issue regarding a json decode error returned when using the Asset Search action.

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

  • For dependencies, pin OS package and Python package versions
  • For security, set least privileged account with USER nobody in the Dockerfile when possible
  • For size, use the slim SDK images when possible: rapid7/insightconnect-python-3-38-slim-plugin:{sdk-version-num} and rapid7/insightconnect-python-3-38-plugin:{sdk-version-num}
  • For error handling, use of PluginException and ConnectionTestException
  • For logging, use self.logger
  • For docs, use changelog style
  • For docs, validate markdown with insight-plugin validate which calls icon_validate to lint help.md

Functional Checklist

  • Work fully completed
  • Functional
    • Any new actions/triggers include JSON test files in the tests/ directory created with insight-plugin samples
    • 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 insight-plugin run -T tests/example.json --debug --jq
      • All actions/triggers shortcut insight-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 insight-plugin run -R tests/example.json --debug --jq
      • All actions/triggers shortcut insight-plugin run --debug --jq (use PR format at end)

Assessment

You must validate your work to reviewers:

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

Comment thread plugins/rapid7_insightvm/komand_rapid7_insightvm/util/resource_requests.py Outdated
Comment thread plugins/rapid7_insightvm/komand_rapid7_insightvm/util/resource_requests.py Outdated
@cmcnally-r7 cmcnally-r7 force-pushed the PLGN-634-IVM-Asset_Search_Malformed_Json branch from 43f802c to f655a7b Compare December 13, 2023 15:12
@cmcnally-r7 cmcnally-r7 merged commit b641593 into develop Dec 13, 2023
cmcnally-r7 added a commit that referenced this pull request Dec 13, 2023
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
@cmcnally-r7 cmcnally-r7 deleted the PLGN-634-IVM-Asset_Search_Malformed_Json branch December 13, 2023 17:07
cmcnally-r7 added a commit that referenced this pull request Dec 13, 2023
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
joneill-r7 pushed a commit that referenced this pull request Dec 14, 2023
* [PLGN-561] Insight VM - Scan Completion Trigger (#2087)

* Init commit - Simple connection test refactor

* Spec mapped draft

* Add new trigger outline

* Trigger template

* Fix snyk | Succesful scan API call | manifest fixed for new trigger

* Save point #1

* Save point #2

* Map inputs

* Start mapping outputs

* Save point #3

* Save point #4

* All API calls mapped

* Save point #5

* Add task init and update risk score to float

* Add msft strip and remove nexpose id

* Save point #6 query search and api calls

* Update output, successful call and outputs

* Update docstrings and type hints

* Save point #7

* Save point #8

* Update single line in query

* filter results and status_id

* query fixed

* Condense results finished

* Changes made to filter

* Cacheing begin

* Save point #9

* Save point #10

* Dockerfile restored and debugging statements

* Get latest to get latest completed

* Trigger + cacheing works

* it works ..

* Trigger working and doc strings added

* Some prospector issues fixed

* Prospector fixes

* Version updated to 620

* Remove software update id

* Removed risk score

* Help MD fix etc

* Remove risk score

* Update help md again

* Update dockerfile

* Add asset group & cve input

* Small dot updates plus verify method

* Updated to paged resource request

* Update to determine cache for resource request

* Black formatting

* Update doc strings and comments

* Update single letter variables

* Fix prospector

* Add severity and cvss score input

* Validator fix

* Update to remove condense results

* Remove hostname and ip input

* Update spec file with corrections

* Remove caching

* Add dot get

* Fix plugin validator

* Update :fingerscrossed

* [PLGN-634] InsightVM - Asset Search | JsonDecode Error (#2185)

* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
cmcnally-r7 added a commit that referenced this pull request Dec 14, 2023
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Dec 14, 2023
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
joneill-r7 pushed a commit that referenced this pull request Dec 15, 2023
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Jan 3, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Jan 3, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
ablakley-r7 pushed a commit that referenced this pull request Jan 8, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Jan 8, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
igorski-r7 pushed a commit that referenced this pull request Jan 8, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Jan 9, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
igorski-r7 pushed a commit that referenced this pull request Jan 15, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
rbowden-r7 pushed a commit that referenced this pull request Jan 15, 2024
* Improved error handling ever so slightly

* Changed single letter variables

* Change error to data
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