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

Bump SonarAnalyzer.CSharp from 8.38.0.46746 to 9.6.0.74858 #2035

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jul 26, 2023

Bumps SonarAnalyzer.CSharp from 8.38.0.46746 to 9.6.0.74858.

Release notes

Sourced from SonarAnalyzer.CSharp's releases.

9.6

This release introduces 3 new security-related rules for VB.NET and improves the precision of their existing C# versions by migrating them to the new symbolic execution engine. This version also includes a new code fix and fixes for false negative issues. Kudos to @​Corniel for his contribution by implementing a codefix for S125 (SonarSource/sonar-dotnet#313)

New Rules

  • 7560 - [VB.NET] New rule S2053: Hashes should include an unpredictable salt
  • 7562 - [VB.NET] New rule S3329: Cipher Block Chaining IVs should be unpredictable
  • 7565 - [VB.NET] New Rule S5773: Types allowed to be deserialized should be restricted

Improvements

  • 7424 - [VB.NET] Merge rule S2373 onto S119 (S2373 is now deprecated)
  • 313 - [C#] Rule S125: Add a code fix to remove the commented code

False Negative

  • 7617 - [C#, VB.NET] Fix S2053 FN: Encoding.GetBytes
  • 7547 - [C#, VB.NET] Fix S6588 FN: Rule should cover case with epoch ticks

9.5

Release 9.5 introduces 9 new rules for C# and VB.NET developers, providing guidelines and best practices for handling date and time operations within their applications. These rules cover a wide range of topics, including time zone conventions, common pitfalls, date parsing and formatting, time arithmetic, and more.

This release includes also one additional security rule and introduces fixes for false negatives and false positives.

Thanks to @​Corniel for his contribution by implementing a new codefix for S6610 (#7517) and fixing a FP in S6354 (#7504).

New Rules

Date & time

  • 7080 - [C#, VB.NET] New rule S6588: Use DateTime(Offset).UnixEpoch instead of pointing to that date using the constructor
  • 7085 - [C#, VB.NET] New rule S6566: Always use DateTimeOffset instead of DateTime
  • 7083 - [C#, VB.NET] New rule S6561: Do not use DateTime.Now for benchmarking or timing operations
  • 7081 - [C#, VB.NET] New rule S6562: Always set the DateTimeKind when creating a new DateTime object
  • 7079 - [C#, VB.NET] New rule S6585: Don't hardcode the format provider when turning dates and times to string
  • 7078 - [C#, VB.NET] New Rule S6580: Always use DateTime.Parse overloads with an IFormatProvider parameter
  • 7077 - [C#, VB.NET] New rule S6575: Use TimeZoneInfo.FindSystemTimeZoneById instead of TimezoneConverter
  • 7076 - [C#, VB.NET] New Rule S6563: Use UTC when recoding DateTime instants
  • 7490|7086 - [C#, VB.NET] New rule S3363: Date and time should not be used as types for primary keys

Others

  • 7290 - [C#] New rule S6640: Allowing unsafe code is security-sensitive

Improvements

  • 7516 - [C#, VB.NET] Rule S6588: implement CodeFix
  • 7517 - [C#] Rule S6610: implement CodeFix
  • 7469 - SE: Run for local functions
  • 7468 - SE: Run for Top-Level statements

False Positive

  • 7504 - [C#, VB.NET] Fix S6354 FP: Do not report on XML crefs and nameof
  • 6223 - [C#, VB.NET] Fix S5332 FP: Improve detection of namespace uris

False Negative

  • 7261 - [C#] Fix S2077 FN: Add support for Mono.Data.Sqlite
  • 7323 - [C#] Fix S2068 FN: add support for SecureString

... (truncated)

Commits
  • 1366be8 Update RSPEC before 9.6 release (#7654)
  • 14115ea S5773: VB.NET implementation (#7623)
  • be9ca30 Improve S5773: Support secondary issue location for partial methods (#7640)
  • 753ea36 Rename CFG NuGet to SonarAnalyzer.CFG (#7644)
  • 6379760 Bump protobuf-java from 3.23.1 to 3.23.4 (#7551)
  • ee189b6 Bump classgraph from 4.8.160 to 4.8.161 (#7543)
  • 28ab634 GitHub workflow: Add CreateCardForIssueFromLabel from dev (#7637)
  • 287465d Migrate S5773: Implement ShouldExecute (#7628)
  • 0b7202c Migrate S5773: Implement the rule in the new SE (#7580)
  • 5558364 SE: Extract common functionality from S3329 and S2053 to a base class (#7627)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jul 26, 2023
@dependabot dependabot bot force-pushed the dependabot/nuget/SonarAnalyzer.CSharp-9.6.0.74858 branch 3 times, most recently from e1987f9 to 8ff0bb8 Compare August 2, 2023 06:20
Bumps [SonarAnalyzer.CSharp](https://github.com/SonarSource/sonar-dotnet) from 8.38.0.46746 to 9.6.0.74858.
- [Release notes](https://github.com/SonarSource/sonar-dotnet/releases)
- [Commits](SonarSource/sonar-dotnet@8.38.0.46746...9.6.0.74858)

---
updated-dependencies:
- dependency-name: SonarAnalyzer.CSharp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/nuget/SonarAnalyzer.CSharp-9.6.0.74858 branch from 8ff0bb8 to 311f70f Compare August 3, 2023 23:36
@pull-request-quantifier-deprecated

This PR has 2 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +1 -1
Percentile : 0.8%

Total files changed: 1

Change summary by file extension:
.csproj : +1 -1

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Aug 7, 2023

Superseded by #2059.

@dependabot dependabot bot closed this Aug 7, 2023
@dependabot dependabot bot deleted the dependabot/nuget/SonarAnalyzer.CSharp-9.6.0.74858 branch August 7, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Extra Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants