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 html elements from ScubaResults.json #1384

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

ehaines1
Copy link
Collaborator

@ehaines1 ehaines1 commented Oct 29, 2024

Removed html tags from ScubaResults.json

🗣 Description

I used the exisiting Format-PlainText method to strip out html tags in ScubaResults.json, specifically for links. This was already being done for ScubaResults.csv.

💭 Motivation and context

Closes #1290

🧪 Testing

To test it, run ScubaGear and verify that the "links" render as text without unicode tags.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • PR targets the correct parent branch (e.g., main or release-name) for merge.
  • Changes are limited to a single goal - eschew scope creep!
  • Changes are sized such that they do not touch excessive number of files.
  • All future TODOs are captured in issues, which are referenced in code comments.
  • These code changes follow the ScubaGear content style guide.
  • Related issues these changes resolve are linked preferably via closing keywords.
  • All relevant type-of-change labels added.
  • All relevant project fields are set.
  • All relevant repo and/or project documentation updated to reflect these changes.
  • Unit tests added/updated to cover PowerShell and Rego changes.
  • Functional tests added/updated to cover PowerShell and Rego changes.
  • All relevant functional tests passed.
  • All automated checks (e.g., linting, static analysis, unit/smoke tests) passed.

✅ Pre-merge checklist

  • PR passed smoke test check.

  • Feature branch has been rebased against changes from parent branch, as needed

    Use Rebase branch button below or use this reference to rebase from the command line.

  • Resolved all merge conflicts on branch

  • Notified merge coordinator that PR is ready for merge via comment mention

✅ Post-merge checklist

  • Feature branch deleted after merge to clean up repository.
  • Verified that all checks pass on parent branch (e.g., main or release-name) after merge.

@ehaines1 ehaines1 linked an issue Oct 29, 2024 that may be closed by this pull request
2 tasks
@ehaines1 ehaines1 self-assigned this Oct 29, 2024
@ehaines1 ehaines1 force-pushed the 1290-remove-html-elements-from-scubaresultsjson branch from 9645dbc to 98500b0 Compare November 4, 2024 15:46
@ehaines1
Copy link
Collaborator Author

ehaines1 commented Nov 5, 2024

Some functional tests have failed, but didn't seem to be related to the changes I made

@ehaines1 ehaines1 closed this Nov 5, 2024
@ehaines1 ehaines1 reopened this Nov 5, 2024
@schrolla schrolla added this to the Kraken milestone Nov 7, 2024
@ehaines1 ehaines1 added bug This issue or pull request addresses broken functionality enhancement This issue or pull request will add new or improve existing functionality and removed bug This issue or pull request addresses broken functionality labels Nov 7, 2024
Copy link
Collaborator

@schrolla schrolla left a comment

Choose a reason for hiding this comment

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

Reviewed the code and output produced against a test tenant from both the main branch and this branch. All conversions in the associated outputs conformed to expected transformations in the ScubaResults.JSON. See comment on additional unit testing.

Recommend updating PR title to use imperative style (i.e. Remove vs. Removed) and fix punctuation and case so it reads something like:
Remove HTML elements from ScubaResults.json

Copy link
Collaborator

Choose a reason for hiding this comment

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

The tests themselves are good, however, they do not include a test for the replaced unicode character \u0026. Recommend adding test(s) for this for completeness.

@ehaines1 ehaines1 changed the title Removed html elements from scubaresultsjson Remove html elements from ScubaResults.json Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue or pull request will add new or improve existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove HTML elements from ScubaResults.json
3 participants