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

LoggingDoNotLog check ensures credentials aren't logged in any form #2205

Merged
merged 3 commits into from
Apr 19, 2022

Conversation

carterkozak
Copy link
Contributor

Loggers themselves are obvious, however exception messages are less
obvious and equally dangerous.

==COMMIT_MSG==
LoggingDoNotLog check ensures credentials aren't logged in any form
==COMMIT_MSG==

Loggers themselves are obvious, however exception messages are less
obvious and equally dangerous.
@changelog-app
Copy link

changelog-app bot commented Apr 18, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

LoggingDoNotLog check ensures credentials aren't logged in any form

Check the box to generate changelog(s)

  • Generate changelog entry

private static final Matcher<ExpressionTree> PRECONDITIONS_METHODS = Matchers.anyOf(
MethodMatchers.staticMethod()
.onClass("com.google.common.base.Preconditions")
.namedAnyOf("checkArgument", "checkNotNull", "checkState"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this just be any method? E.g. there is also checkElementIndex and checkPositionIndex.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to cover the most common methods, supporting others requires a different argument index offset. Could be a future improvement to this check.

Copy link
Contributor

@fawind fawind left a comment

Choose a reason for hiding this comment

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

Looks good!

@bulldozer-bot bulldozer-bot bot merged commit 8a749d2 into develop Apr 19, 2022
@bulldozer-bot bulldozer-bot bot deleted the ckozak/LoggingDoNotLog branch April 19, 2022 10:56
@svc-autorelease
Copy link
Collaborator

Released 4.108.0

This was referenced Apr 19, 2022
bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Apr 19, 2022
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.108.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | LoggingDoNotLog check ensures credentials aren't logged in any form | palantir/gradle-baseline#2205 |



To enable or disable this check, please contact the maintainers of Excavator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants