KEMBAR78
:sparkles: recognize escaped emails in security policy documents by ralphbean · Pull Request #4676 · ossf/scorecard · GitHub
Skip to content

Conversation

ralphbean
Copy link
Contributor

@ralphbean ralphbean commented Jun 26, 2025

What kind of change does this PR introduce?

I think this counts as a feature (a micro feature).

Some security policy documents may include an email address partially
obfuscated in the form security[at]example.org or, especially in
markdown, escaped like security\[at\]example.org.

This change updates the regex to recognize those two forms, with the
tests expanded to cover those cases as well.

What is the current behavior?

Only emails of the form security@example.org are recognized.

What is the new behavior (if this is a feature change)?**

Emails of the form security[at]example.org and security[at]example.org are recognized.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

This depends first on #4674 being merged.

Does this PR introduce a user-facing change?

Start recognizing escaped emails in security policy documents

@ralphbean ralphbean requested a review from a team as a code owner June 26, 2025 21:52
@ralphbean ralphbean requested review from justaugustus and spencerschrock and removed request for a team June 26, 2025 21:52
@ralphbean ralphbean force-pushed the additional-email-formats branch from a8840d5 to c1b69ce Compare June 26, 2025 21:53
Copy link
Member

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

generally looks good, one or two small questions

Some security policy documents may include an email address partially
obfuscated in the form security[at]example.org or, especially in
markdown, escaped like security\[at\]example.org.

This change updates the regex to recognize those two forms, with the
tests expanded to cover those cases as well.

Signed-off-by: Ralph Bean <rbean@redhat.com>
@spencerschrock
Copy link
Member

/scdiff generate Security-Policy

@github-actions
Copy link

Copy link
Member

@spencerschrock spencerschrock left a comment

Choose a reason for hiding this comment

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

Thanks

@spencerschrock spencerschrock merged commit f96f4f4 into ossf:main Jun 27, 2025
36 checks passed
@codecov
Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.29%. Comparing base (353ed60) to head (759786d).
Report is 188 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4676      +/-   ##
==========================================
+ Coverage   66.80%   68.29%   +1.48%     
==========================================
  Files         230      249      +19     
  Lines       16602    18884    +2282     
==========================================
+ Hits        11091    12896    +1805     
- Misses       4808     5129     +321     
- Partials      703      859     +156     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants