@@ -52,30 +52,18 @@ func scoreSecurityCriteria(f checker.File, info []checker.SecurityPolicyInformat
5252 Text : "" ,
5353 }
5454
55- // #1: found one linked (email/http) content: score += 3
56- // rationale: someone to collaborate with or link to
57- // information (strong for community)
58- if urls >= 1 || emails >= 1 {
59- score += 3
55+ // #1: more than one unique (email/http) linked content found: score += 6
56+ // rationale: if more than one link, even stronger for the community
57+ if (urls + emails ) > 0 {
58+ score += 6
6059 msg .Text = "Found linked content in security policy"
6160 dl .Info (& msg )
6261 } else {
6362 msg .Text = "no email or URL found in security policy"
6463 dl .Warn (& msg )
6564 }
6665
67- // #2: more than one unique (email/http) linked content found: score += 3
68- // rationale: if more than one link, even stronger for the community
69- if (urls + emails ) > 1 {
70- score += 3
71- msg .Text = "Found multiple linked content in security policy"
72- dl .Info (& msg )
73- } else {
74- msg .Text = "Only one email or URL (if any) found in security policy"
75- dl .Warn (& msg )
76- }
77-
78- // #3: more bytes than the sum of the length of all the linked content found: score += 3
66+ // #2: more bytes than the sum of the length of all the linked content found: score += 3
7967 // rationale: there appears to be information and context around those links
8068 // no credit if there is just a link to a site or an email address (those given above)
8169 // the test here is that each piece of linked content will likely contain a space
@@ -89,7 +77,7 @@ func scoreSecurityCriteria(f checker.File, info []checker.SecurityPolicyInformat
8977 dl .Warn (& msg )
9078 }
9179
92- // #4 : found whole number(s) and or match(es) to "Disclos" and or "Vuln": score += 1
80+ // #3 : found whole number(s) and or match(es) to "Disclos" and or "Vuln": score += 1
9381 // rationale: works towards the intent of the security policy file
9482 // regarding whom to contact about vuls and disclosures and timing
9583 // e.g., we'll disclose, report a vulnerabily, 30 days, etc.
0 commit comments