mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
Security-Policy
should not run on --local
(#1825)
Co-authored-by: Azeem Shaikh <azeems@google.com>
This commit is contained in:
parent
4df16f3350
commit
333618d0d2
@ -41,11 +41,6 @@ func SecurityPolicy(c *checker.CheckRequest) (checker.SecurityPolicyData, error)
|
||||
}
|
||||
|
||||
// Check if present in parent org.
|
||||
parentOrg := c.Repo.Org()
|
||||
if parentOrg == nil {
|
||||
return checker.SecurityPolicyData{}, nil
|
||||
}
|
||||
|
||||
// https#://docs.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file.
|
||||
// TODO(1491): Make this non-GitHub specific.
|
||||
logger := log.NewLogger(log.InfoLevel)
|
||||
|
@ -99,10 +99,6 @@ func TestSecurityPolicy(t *testing.T) {
|
||||
"doc/security.rst",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "early return if org is null",
|
||||
files: []string{},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
tt := tt
|
||||
|
@ -27,7 +27,6 @@ const CheckSecurityPolicy = "Security-Policy"
|
||||
//nolint:gochecknoinits
|
||||
func init() {
|
||||
supportedRequestTypes := []checker.RequestType{
|
||||
checker.FileBased,
|
||||
checker.CommitBased,
|
||||
}
|
||||
if err := registerCheck(CheckSecurityPolicy, SecurityPolicy, supportedRequestTypes); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user