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

Call Devise RegistrationsController block #3286

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

lloeki
Copy link
Contributor

@lloeki lloeki commented Nov 28, 2023

What does this PR do?

When a Devise user calls create with a block, that block was swallowed by the block we use to perform our resource information extraction for registration events.

Ensure the original block is called. We call it after our analysis in the event we should block for some reason, thus protecting the additional user code in their block.

Motivation:

User-reported issue.

Additional Notes:

JIRA:

How to test the change?

Specs

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

When a Devise user calls create with a block, that block was swallowed
by the block we use to perform our resource information extraction for
registration events.

Ensure the original block is called. We call it after our analysis in
the event we should block for some reason, thus protecting the
additional user code in their block.

JIRA:
- [SCRS-704](https://datadoghq.atlassian.net/browse/SCRS-704)
- [APPSEC-12115](https://datadoghq.atlassian.net/browse/APPSEC-12115)
- [APPSEC-12770](https://datadoghq.atlassian.net/browse/APPSEC-12770)
@lloeki lloeki requested a review from a team as a code owner November 28, 2023 10:38
@github-actions github-actions bot added appsec Application Security monitoring product integrations Involves tracing integrations labels Nov 28, 2023
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (dfacb69) 98.22% compared to head (176c642) 98.22%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3286   +/-   ##
=======================================
  Coverage   98.22%   98.22%           
=======================================
  Files        1253     1253           
  Lines       72479    72545   +66     
  Branches     3403     3404    +1     
=======================================
+ Hits        71194    71260   +66     
  Misses       1285     1285           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lloeki lloeki merged commit 2d4dad6 into master Nov 28, 2023
219 checks passed
@lloeki lloeki deleted the call-devise-registrations-controller-create-block branch November 28, 2023 14:32
@github-actions github-actions bot added this to the 1.18.0 milestone Nov 28, 2023
@TonyCTHsu TonyCTHsu mentioned this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appsec Application Security monitoring product integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants