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

Change: Various script_xref() related extensions / modifications. #642

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

cfi-gb
Copy link
Member

@cfi-gb cfi-gb commented Oct 12, 2023

What

Note: #643 should be merged first to have it included in the next release as well

Extending the plugin accordingly to catch something like below seen in greenbone/vulnerability-tests#7373

  script_xref(name:"Policy", value:"CIS Microsoft Windows 10 Enterprise (Release 22H2) Benchmark v2.0.0: REMOVE - 2.3.17 (L1) Ensure 'User Account Control: Allow UIAccess applications to prompt for elevation without using the secure desktop' is set to 'Disabled' Ticket #8863 ");

Old QA step was able to catch this while the new Troubadix not because it seems there was no support for checking script_xref() tags within it.

While doing this i had also noticed that there were two _XREF_TAG_PATTERN defined and get_xref_pattern didn't worked as expected for the script_tag_whitespaces.py plugins so had to do some additional adjustments / updates.

Why

Better/extended QA checks and more unit tests.

References

None

Checklist

  • Tests

@cfi-gb cfi-gb self-assigned this Oct 12, 2023
@cfi-gb cfi-gb requested a review from a team as a code owner October 12, 2023 13:36
@cfi-gb cfi-gb marked this pull request as draft October 12, 2023 13:36
@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Conventional Commits Report

Type Number
Changed 5

🚀 Conventional commits found.

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

Merging #642 (1b1d063) into main (ea2bd33) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 1b1d063 differs from pull request most recent head 5f19897. Consider uploading reports for the commit 5f19897 to get more accurate results

@@           Coverage Diff           @@
##             main     #642   +/-   ##
=======================================
  Coverage   78.19%   78.19%           
=======================================
  Files          80       80           
  Lines        2692     2692           
  Branches      569      569           
=======================================
  Hits         2105     2105           
  Misses        441      441           
  Partials      146      146           
Files Coverage Δ
troubadix/helper/patterns.py 97.93% <ø> (-0.03%) ⬇️
troubadix/plugins/script_tag_whitespaces.py 100.00% <100.00%> (ø)
troubadix/plugins/script_xref_form.py 87.50% <ø> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@cfi-gb cfi-gb force-pushed the extend_script_tag_whitespaces branch 3 times, most recently from 7ddc3d0 to 814df54 Compare October 12, 2023 13:56
@cfi-gb cfi-gb changed the title Change: Extend script_tag_whitespaces to also check script_xref() tags. Change: Various script_xref() related extensions / modifications. Oct 13, 2023
@cfi-gb cfi-gb removed their assignment Oct 13, 2023
@cfi-gb cfi-gb marked this pull request as ready for review October 13, 2023 04:25
@cfi-gb cfi-gb added the make release To trigger GitHub release action label Oct 13, 2023
@mbrinkhoff mbrinkhoff force-pushed the extend_script_tag_whitespaces branch from 1b1d063 to 5f19897 Compare November 9, 2023 09:34
@mbrinkhoff mbrinkhoff merged commit 131a013 into main Nov 9, 2023
10 checks passed
@mbrinkhoff mbrinkhoff deleted the extend_script_tag_whitespaces branch November 9, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
make release To trigger GitHub release action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants