Skip to content

Commit

Permalink
internetstandards#881 add scoring for TLS-RPR existance check
Browse files Browse the repository at this point in the history
  • Loading branch information
uwekamper committed Feb 10, 2024
1 parent ef6031c commit 524babf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checks/categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -2179,8 +2179,8 @@ def __init__(self):
label="detail mail auth spf label",
explanation="detail mail auth spf exp",
tech_string="detail mail auth spf tech table",
worst_status=scoring.MAIL_AUTH_SPF_WORST_STATUS,
full_score=scoring.MAIL_AUTH_SPF_PASS,
worst_status=scoring.MAIL_AUTH_TLSRPT_WORST_STATUS_WORST_STATUS,
full_score=scoring.MAIL_AUTH_TLSRPT_PASS,
model_score_field="spf_score",
)
# Fix for one line, one value data.
Expand Down Expand Up @@ -2250,13 +2250,13 @@ def result_bad_redirect(self, tech_data):
class MailAuthTlsRptExists(Subtest):
def __init__(self):
super().__init__(
name="spf",
name="tlsrpt",
label="detail mail auth tlsrpt label",
explanation="detail mail auth tlsrpt exp",
tech_string="detail mail auth tlsrpt tech table",
worst_status=scoring.MAIL_AUTH_SPF_WORST_STATUS,
full_score=scoring.MAIL_AUTH_SPF_PASS,
model_score_field="spf_score",
model_score_field="tlsrpt_score",
)
# Fix for one line, one value data.
self.tech_data = [[self.tech_data]]
Expand Down
5 changes: 5 additions & 0 deletions checks/scoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@
MAIL_AUTH_SPF_ERROR = NO_POINTS
MAIL_AUTH_SPF_WORST_STATUS = STATUS_FAIL

MAIL_AUTH_TLSRPT_PASS = NO_POINTS
MAIL_AUTH_TLSRPT_FAIL = NO_POINTS # TLS-RPT fail does not give a points penalty
MAIL_AUTH_TLSRPT_ERROR = NO_POINTS
MAIL_AUTH_TLSRPT_WORST_STATUS = STATUS_FAIL

MAIL_AUTH_SPF_POLICY_PASS = FULL_WEIGHT_POINTS
MAIL_AUTH_SPF_POLICY_PARTIAL = LESS_WEIGHT_POINTS
MAIL_AUTH_SPF_POLICY_FAIL = NO_POINTS
Expand Down

0 comments on commit 524babf

Please sign in to comment.