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

feat(policies): initial Rails JWT leaks #182

Merged
merged 2 commits into from
Dec 1, 2022
Merged

Conversation

elsapet
Copy link
Contributor

@elsapet elsapet commented Nov 30, 2022

Description

Support for JWT policy

Sample policy report

CRITICAL: JWT leaking policy breach with Personal data
JWT leaks detected

File: ../../Desktop/example/user.rb:10

 10 JWT.encode user.address, nil, 'none'

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@swarmia
Copy link

swarmia bot commented Nov 30, 2022

@elsapet
Copy link
Contributor Author

elsapet commented Nov 30, 2022

Advance apologies for a confused question, but with variable reconciliation should we be able to detect the following?

payload = {
	user: {
		first_name: "John",
		last_name: "Doe",
	}
}

token1 = JWT.encode payload, nil, "none"

@cfabianski
Copy link
Collaborator

@elsapet we should but it’s not working right now. Working on it with @didroe 😉

@elsapet elsapet marked this pull request as ready for review December 1, 2022 07:42
@elsapet elsapet merged commit cc94a7b into main Dec 1, 2022
@elsapet elsapet deleted the AMA-3283-jwt-leaking branch December 1, 2022 08:40
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.

None yet

2 participants