Skip to content

Conversation

@HeyItsGilbert
Copy link
Owner

Added

  • Measure-BasicWebRequestProperty: Detects when Invoke-WebRequest uses UseBasicParsing with incompatible properties like Forms, ParsedHtml, Scripts, or AllElements. Works with both direct property access and variable assignments.
  • Measure-InvokeWebRequestWithoutBasic: Flags Invoke-WebRequest (and its aliases iwr, curl) when used without the UseBasicParsing parameter.
  • Get-CommandParameter: New private helper function to parse command parameters from AST, including support for positional parameters.
  • Documentation for new rules in docs/en-US/ directory.
  • Comprehensive test coverage for new rules.

Changed

  • Updated about_GoodEnoughRules.help.md with complete module documentation including examples, rule descriptions, and troubleshooting guidance.
  • Measure-SecureStringWithKey: Standardized parameter block formatting and updated to use Get-CommandParameter helper function.
  • Test files: Added BeforeAll checks to ensure module builds before testing.
  • Improved code consistency across all rule files (param block formatting, using consistent helper function names).

### Added

- `Measure-BasicWebRequestProperty`: Detects when `Invoke-WebRequest` uses
  `UseBasicParsing` with incompatible properties like `Forms`, `ParsedHtml`,
  `Scripts`, or `AllElements`. Works with both direct property access and
  variable assignments.
- `Measure-InvokeWebRequestWithoutBasic`: Flags `Invoke-WebRequest` (and its
  aliases `iwr`, `curl`) when used without the `UseBasicParsing` parameter.
- `Get-CommandParameter`: New private helper function to parse command
  parameters from AST, including support for positional parameters.
- Documentation for new rules in `docs/en-US/` directory.
- Comprehensive test coverage for new rules.

### Changed

- Updated `about_GoodEnoughRules.help.md` with complete module documentation
  including examples, rule descriptions, and troubleshooting guidance.
- `Measure-SecureStringWithKey`: Standardized parameter block formatting and
  updated to use `Get-CommandParameter` helper function.
- Test files: Added BeforeAll checks to ensure module builds before testing.
- Improved code consistency across all rule files (param block formatting,
  using consistent helper function names).
* Added `contents: read` and `issues: write` permissions to enhance workflow capabilities.
@github-actions
Copy link

github-actions bot commented Dec 13, 2025

Test Results

  3 files   57 suites   2s ⏱️
 67 tests  65 ✅ 2 💤 0 ❌
204 runs  198 ✅ 6 💤 0 ❌

Results for commit 7609530.

♻️ This comment has been updated with latest results.

@HeyItsGilbert HeyItsGilbert merged commit 99555f3 into main Dec 14, 2025
6 checks passed
@HeyItsGilbert HeyItsGilbert deleted the IWR branch December 14, 2025 00:01
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.

2 participants