-
Notifications
You must be signed in to change notification settings - Fork 754
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
#13619 secure parameter linter fix #13717
Merged
anthony-c-martin
merged 3 commits into
Azure:main
from
davidlloyduk:13619_secureparam_linter_warning
Apr 3, 2024
Merged
#13619 secure parameter linter fix #13717
anthony-c-martin
merged 3 commits into
Azure:main
from
davidlloyduk:13619_secureparam_linter_warning
Apr 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@microsoft-github-policy-service agree |
davidlloyduk
changed the title
#13619 SecureParameter linter fix
#13619 secure parameter linter fix
Mar 25, 2024
jeskew
reviewed
Mar 27, 2024
src/Bicep.Core/Analyzers/Linter/Rules/SecureParameterDefaultRule.cs
Outdated
Show resolved
Hide resolved
davidlloyduk
force-pushed
the
13619_secureparam_linter_warning
branch
from
March 28, 2024 14:15
b7e0578
to
3ee6379
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13717 +/- ##
===========================================
- Coverage 94.28% 7.71% -86.57%
===========================================
Files 1113 7 -1106
Lines 100791 350 -100441
Branches 8734 127 -8607
===========================================
- Hits 95028 27 -95001
+ Misses 4595 323 -4272
+ Partials 1168 0 -1168
Flags with carried forward coverage won't be shown. Click here to find out more. |
Thank you for fixing this! |
anthony-c-martin
approved these changes
Apr 3, 2024
Test this change out locally with the following install scripts (Action run 8544728506) VSCode
Azure CLI
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #13619
What was happening was that the linter rule was falling into the default behaviour and using the default error string as it wasn't checking it was a variable assignment. Added 1 unit test to cover the basic premise of the lint rule failure.
One thing which did occur to me was that assignment of the secure parameter to a variable which is a hardcoded string isnt caught - but seemed like it should be a lint rule in of itself? Thoughts?
eg.
Should we overcomplicate the lint rule to find a reassignment of a secure parameter? Seems an illogical but valid thing to do though