44 "errors"
55 "gh_foundations/internal/pkg/types"
66 "slices"
7+ "time"
78
89 "github.com/google/go-github/v61/github"
910)
@@ -16,14 +17,15 @@ type Organization struct {
1617func (o * Organization ) Check (checkTypes []types.CheckType ) types.CheckReport {
1718 report := types.CheckReport {
1819 EntityType : "github_organization" ,
19- EntityId : o .GetName (),
20+ EntityId : o .GetLogin (),
21+ Timestamp : time .Now ().Format (time .RFC3339 ), // Syslog compliant timestamp
2022 Results : make (map [types.CheckType ]types.CheckResult ),
2123 Errors : []types.CheckError {},
2224 }
2325 for _ , t := range checkTypes {
2426 switch t {
2527 case types .GoCGuardrails :
26- r , err := o .GoCGaurdrailsCompliant ()
28+ r , err := o .GoCGuardrailsCompliant ()
2729 if err != nil {
2830 report .Errors = append (report .Errors , * err )
2931 }
@@ -36,7 +38,7 @@ func (o *Organization) Check(checkTypes []types.CheckType) types.CheckReport {
3638}
3739
3840// Custom repository roles for an organization need to be accessed separately from settings
39- func (o * Organization ) GoCGaurdrailsCompliant () (types.CheckResult , * types.CheckError ) {
41+ func (o * Organization ) GoCGuardrailsCompliant () (types.CheckResult , * types.CheckError ) {
4042 var allErrors error
4143 violations := make (map [string ]string )
4244 checks := []func (org * Organization ) (string , error ){
0 commit comments