Documentation ¶
Index ¶
Constants ¶
View Source
const (
IntegrationName = integration.Type("github_account") // example: AWS_ACCOUNT, AZURE_SUBSCRIPTION
)
View Source
const (
IntegrationTypeGithubAccount = integration.Type("github_account") // example: aws_cloud, azure_subscription
)
Variables ¶
View Source
var DescriptionMap = map[string]interface{}{ "Github/Actions/Artifact": opengovernance.Artifact{}, "Github/Actions/Runner": opengovernance.Runner{}, "Github/Actions/Secret": opengovernance.Secret{}, "Github/Actions/WorkflowRun": opengovernance.WorkflowRun{}, "Github/Branch": opengovernance.Branch{}, "Github/Branch/Protection": opengovernance.BranchProtection{}, "Github/Commit": opengovernance.Commit{}, "Github/Issue": opengovernance.Issue{}, "Github/License": opengovernance.License{}, "Github/Organization": opengovernance.Organization{}, "Github/Organization/Collaborator": opengovernance.OrgCollaborators{}, "Github/Organization/Dependabot/Alert": opengovernance.OrgAlertDependabot{}, "Github/Organization/Member": opengovernance.OrgMembers{}, "Github/Organization/Team": opengovernance.Team{}, "Github/PullRequest": opengovernance.PullRequest{}, "Github/Release": opengovernance.Release{}, "Github/Repository": opengovernance.Repository{}, "Github/Repository/Collaborator": opengovernance.RepoCollaborators{}, "Github/Repository/DependabotAlert": opengovernance.RepoAlertDependabot{}, "Github/Repository/Deployment": opengovernance.RepoDeployment{}, "Github/Repository/Environment": opengovernance.RepoEnvironment{}, "Github/Repository/Ruleset": opengovernance.RepoRuleSet{}, "Github/Repository/SBOM": opengovernance.RepoSBOM{}, "Github/Repository/VulnerabilityAlert": opengovernance.RepoVulnerabilityAlert{}, "Github/Tag": opengovernance.Tag{}, "Github/Team/Member": opengovernance.TeamMembers{}, "Github/User": opengovernance.User{}, "Github/Workflow": opengovernance.Workflow{}, "Github/Container/Package": opengovernance.ContainerPackage{}, "Github/Package/Maven": opengovernance.PackageDetail{}, "Github/NPM/Package": opengovernance.PackageDetail{}, "Github/Nuget/Package": opengovernance.Package{}, "Github/Artifact/DockerFile": opengovernance.ArtifactDockerFile{}, }
View Source
var Map = map[string]string{
"Github/Actions/Artifact": "github_actions_artifact",
"Github/Actions/Runner": "github_actions_runner",
"Github/Actions/Secret": "github_actions_secret",
"Github/Actions/WorkflowRun": "github_actions_workflow_run",
"Github/Branch": "github_branch",
"Github/Branch/Protection": "github_branch_protection",
"Github/Commit": "github_commit",
"Github/Issue": "github_issue",
"Github/License": "github_license",
"Github/Organization": "github_organization",
"Github/Organization/Collaborator": "github_organization_collaborator",
"Github/Organization/Dependabot/Alert": "github_organization_dependabot_alert",
"Github/Organization/Member": "github_organization_member",
"Github/Organization/Team": "github_organization_team",
"Github/PullRequest": "github_pull_request",
"Github/Release": "github_release",
"Github/Repository": "github_repository",
"Github/Repository/Collaborator": "github_repository_collaborator",
"Github/Repository/DependabotAlert": "github_repository_dependabot_alert",
"Github/Repository/Deployment": "github_repository_deployment",
"Github/Repository/Environment": "github_repository_environment",
"Github/Repository/Ruleset": "github_repository_ruleset",
"Github/Repository/SBOM": "github_repository_sbom",
"Github/Repository/VulnerabilityAlert": "github_repository_vulnerability_alert",
"Github/Tag": "github_tag",
"Github/Team/Member": "github_team_member",
"Github/User": "github_user",
"Github/Workflow": "github_workflow",
"Github/Container/Package": "github_container_package",
"Github/Package/Maven": "github_maven_package",
"Github/NPM/Package": "github_npm_package",
"Github/Nuget/Package": "github_nuget_package",
"Github/Artifact/DockerFile": "github_artifact_dockerfile",
}
View Source
var ResourceTypeConfigs = map[string]*ResourceTypeConfiguration{ "Github/Container/Package": { Name: "Github/Container/Package", IntegrationType: IntegrationTypeGithubAccount, Description: "", Params: []Param{ { Name: "organization", Description: `Please provide the organization name`, Required: false, }, }, }, "Github/Repository": { Name: "Github/Repository", IntegrationType: IntegrationTypeGithubAccount, Description: "", Params: []Param{ { Name: "repository", Description: `Please provide the repo name (i.e. "internal-tools")`, Required: false, }, { Name: "organization", Description: `Please provide the organization name`, Required: false, }, }, }, "Github/Artifact/DockerFile": { Name: "Github/Artifact/DockerFile", IntegrationType: IntegrationTypeGithubAccount, Description: "", Params: []Param{ { Name: "repository", Description: `Please provide the repo name (i.e. "internal-tools")`, Required: false, }, { Name: "organization", Description: `Please provide the organization name`, Required: false, }, }, }, "Github/Actions/WorkflowRun": { Name: "Github/Actions/WorkflowRun", IntegrationType: IntegrationTypeGithubAccount, Description: "", Params: []Param{ { Name: "repository", Description: `Please provide the repo name (i.e. "internal-tools")`, Required: false, }, { Name: "organization", Description: `Please provide the organization name`, Required: false, }, { Name: "run_number", Description: `Please provide the run number`, Required: false, }, }, }, }
View Source
var ResourceTypes = map[string]model.ResourceType{ "Github/Actions/Artifact": { IntegrationType: IntegrationName, ResourceName: "Github/Actions/Artifact", Tags: map[string][]string{ "category": {"Action"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllArtifacts), GetDescriber: provider.DescribeSingleByRepo(describers.GetArtifact), }, "Github/Actions/Runner": { IntegrationType: IntegrationName, ResourceName: "Github/Actions/Runner", Tags: map[string][]string{ "category": {"Action"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRunners), GetDescriber: provider.DescribeSingleByRepo(describers.GetActionRunner), }, "Github/Actions/Secret": { IntegrationType: IntegrationName, ResourceName: "Github/Actions/Secret", Tags: map[string][]string{ "category": {"Action"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllSecrets), GetDescriber: provider.DescribeSingleByRepo(describers.GetRepoActionSecret), }, "Github/Actions/WorkflowRun": { IntegrationType: IntegrationName, ResourceName: "Github/Actions/WorkflowRun", Tags: map[string][]string{ "category": {"Action"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllWorkflowRuns), GetDescriber: nil, }, "Github/Branch": { IntegrationType: IntegrationName, ResourceName: "Github/Branch", Tags: map[string][]string{ "category": {"Branch"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllBranches), GetDescriber: nil, }, "Github/Branch/Protection": { IntegrationType: IntegrationName, ResourceName: "Github/Branch/Protection", Tags: map[string][]string{ "category": {"Branch"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllBranchProtections), GetDescriber: nil, }, "Github/Commit": { IntegrationType: IntegrationName, ResourceName: "Github/Commit", Tags: map[string][]string{ "category": {"Commit"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.ListCommits), GetDescriber: nil, }, "Github/Issue": { IntegrationType: IntegrationName, ResourceName: "Github/Issue", Tags: map[string][]string{ "category": {"Issue"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetIssueList), GetDescriber: provider.DescribeSingleByRepo(describers.GetIssue), }, "Github/License": { IntegrationType: IntegrationName, ResourceName: "Github/License", Tags: map[string][]string{ "category": {"License"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetLicenseList), GetDescriber: provider.DescribeSingleByRepo(describers.GetLicense), }, "Github/Organization": { IntegrationType: IntegrationName, ResourceName: "Github/Organization", Tags: map[string][]string{ "category": {"Organization"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetOrganizationList), GetDescriber: nil, }, "Github/Organization/Collaborator": { IntegrationType: IntegrationName, ResourceName: "Github/Organization/Collaborator", Tags: map[string][]string{ "category": {"Organization"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllOrganizationsCollaborators), GetDescriber: nil, }, "Github/Organization/Dependabot/Alert": { IntegrationType: IntegrationName, ResourceName: "Github/Organization/Dependabot/Alert", Tags: map[string][]string{ "category": {"Organization"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllOrganizationsDependabotAlerts), GetDescriber: nil, }, "Github/Organization/Member": { IntegrationType: IntegrationName, ResourceName: "Github/Organization/Member", Tags: map[string][]string{ "category": {"Organization"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllMembers), GetDescriber: nil, }, "Github/Organization/Team": { IntegrationType: IntegrationName, ResourceName: "Github/Organization/Team", Tags: map[string][]string{ "category": {"Organization"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetOrganizationTeamList), GetDescriber: nil, }, "Github/PullRequest": { IntegrationType: IntegrationName, ResourceName: "Github/PullRequest", Tags: map[string][]string{ "category": {"PullRequest"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllPullRequests), GetDescriber: nil, }, "Github/Release": { IntegrationType: IntegrationName, ResourceName: "Github/Release", Tags: map[string][]string{ "category": {"Release"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetReleaseList), GetDescriber: nil, }, "Github/Repository": { IntegrationType: IntegrationName, ResourceName: "Github/Repository", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetRepositoryList), GetDescriber: provider.DescribeSingleByRepo(describers.GetRepository), }, "Github/Repository/Collaborator": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/Collaborator", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesCollaborators), GetDescriber: nil, }, "Github/Repository/DependabotAlert": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/DependabotAlert", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesDependabotAlerts), GetDescriber: nil, }, "Github/Repository/Deployment": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/Deployment", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesDeployments), GetDescriber: nil, }, "Github/Repository/Environment": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/Environment", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesEnvironments), GetDescriber: nil, }, "Github/Repository/Ruleset": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/Ruleset", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesRuleSets), GetDescriber: nil, }, "Github/Repository/SBOM": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/SBOM", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesSBOMs), GetDescriber: nil, }, "Github/Repository/VulnerabilityAlert": { IntegrationType: IntegrationName, ResourceName: "Github/Repository/VulnerabilityAlert", Tags: map[string][]string{ "category": {"Repository"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllRepositoriesVulnerabilities), GetDescriber: nil, }, "Github/Tag": { IntegrationType: IntegrationName, ResourceName: "Github/Tag", Tags: map[string][]string{ "category": {"Tag"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllTags), GetDescriber: nil, }, "Github/Team/Member": { IntegrationType: IntegrationName, ResourceName: "Github/Team/Member", Tags: map[string][]string{ "category": {"Team"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllTeamsMembers), GetDescriber: nil, }, "Github/User": { IntegrationType: IntegrationName, ResourceName: "Github/User", Tags: map[string][]string{ "category": {"user"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetUser), GetDescriber: nil, }, "Github/Workflow": { IntegrationType: IntegrationName, ResourceName: "Github/Workflow", Tags: map[string][]string{ "category": {"workflow"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetAllWorkflows), GetDescriber: provider.DescribeSingleByRepo(describers.GetRepositoryWorkflow), }, "Github/Container/Package": { IntegrationType: IntegrationName, ResourceName: "Github/Container/Package", Tags: map[string][]string{ "category": {"package"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetContainerPackageList), GetDescriber: nil, }, "Github/Package/Maven": { IntegrationType: IntegrationName, ResourceName: "Github/Package/Maven", Tags: map[string][]string{ "category": {"package"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetMavenPackageList), GetDescriber: nil, }, "Github/NPM/Package": { IntegrationType: IntegrationName, ResourceName: "Github/NPM/Package", Tags: map[string][]string{ "category": {"package"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetNPMPackageList), GetDescriber: nil, }, "Github/Nuget/Package": { IntegrationType: IntegrationName, ResourceName: "Github/Nuget/Package", Tags: map[string][]string{ "category": {"package"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.GetNugetPackageList), GetDescriber: provider.DescribeSingleByRepo(describers.GetNugetPackage), }, "Github/Artifact/DockerFile": { IntegrationType: IntegrationName, ResourceName: "Github/Artifact/DockerFile", Tags: map[string][]string{ "category": {"artifact_dockerfile"}, }, Labels: map[string]string{}, Annotations: map[string]string{}, ListDescriber: provider.DescribeByGithub(describers.ListArtifactDockerFiles), GetDescriber: nil, }, }
View Source
var ResourceTypesList = []string{
"Github/Actions/Artifact",
"Github/Actions/Runner",
"Github/Actions/Secret",
"Github/Actions/WorkflowRun",
"Github/Branch",
"Github/Branch/Protection",
"Github/Commit",
"Github/Issue",
"Github/License",
"Github/Organization",
"Github/Organization/Collaborator",
"Github/Organization/Dependabot/Alert",
"Github/Organization/Member",
"Github/Organization/Team",
"Github/PullRequest",
"Github/Release",
"Github/Repository",
"Github/Repository/Collaborator",
"Github/Repository/DependabotAlert",
"Github/Repository/Deployment",
"Github/Repository/Environment",
"Github/Repository/Ruleset",
"Github/Repository/SBOM",
"Github/Repository/VulnerabilityAlert",
"Github/Tag",
"Github/Team/Member",
"Github/User",
"Github/Workflow",
"Github/Container/Package",
"Github/Package/Maven",
"Github/NPM/Package",
"Github/Nuget/Package",
"Github/Artifact/DockerFile",
}
View Source
var ReverseMap = map[string]string{
"github_actions_artifact": "Github/Actions/Artifact",
"github_actions_runner": "Github/Actions/Runner",
"github_actions_secret": "Github/Actions/Secret",
"github_actions_workflow_run": "Github/Actions/WorkflowRun",
"github_branch": "Github/Branch",
"github_branch_protection": "Github/Branch/Protection",
"github_commit": "Github/Commit",
"github_issue": "Github/Issue",
"github_license": "Github/License",
"github_organization": "Github/Organization",
"github_organization_collaborator": "Github/Organization/Collaborator",
"github_organization_dependabot_alert": "Github/Organization/Dependabot/Alert",
"github_organization_member": "Github/Organization/Member",
"github_organization_team": "Github/Organization/Team",
"github_pull_request": "Github/PullRequest",
"github_release": "Github/Release",
"github_repository": "Github/Repository",
"github_repository_collaborator": "Github/Repository/Collaborator",
"github_repository_dependabot_alert": "Github/Repository/DependabotAlert",
"github_repository_deployment": "Github/Repository/Deployment",
"github_repository_environment": "Github/Repository/Environment",
"github_repository_ruleset": "Github/Repository/Ruleset",
"github_repository_sbom": "Github/Repository/SBOM",
"github_repository_vulnerability_alert": "Github/Repository/VulnerabilityAlert",
"github_tag": "Github/Tag",
"github_team_member": "Github/Team/Member",
"github_user": "Github/User",
"github_workflow": "Github/Workflow",
"github_container_package": "Github/Container/Package",
"github_maven_package": "Github/Package/Maven",
"github_npm_package": "Github/NPM/Package",
"github_nuget_package": "Github/Nuget/Package",
"github_artifact_dockerfile": "Github/Artifact/DockerFile",
}
View Source
var TablesToResourceTypes = map[string]string{
"github_actions_artifact": "Github/Actions/Artifact",
"github_actions_runner": "Github/Actions/Runner",
"github_actions_secret": "Github/Actions/Secret",
"github_actions_workflow_run": "Github/Actions/WorkflowRun",
"github_branch": "Github/Branch",
"github_branch_protection": "Github/Branch/Protection",
"github_commit": "Github/Commit",
"github_issue": "Github/Issue",
"github_license": "Github/License",
"github_organization": "Github/Organization",
"github_organization_collaborator": "Github/Organization/Collaborator",
"github_organization_dependabot_alert": "Github/Organization/Dependabot/Alert",
"github_organization_member": "Github/Organization/Member",
"github_organization_team": "Github/Organization/Team",
"github_pull_request": "Github/PullRequest",
"github_release": "Github/Release",
"github_repository": "Github/Repository",
"github_repository_collaborator": "Github/Repository/Collaborator",
"github_repository_dependabot_alert": "Github/Repository/DependabotAlert",
"github_repository_deployment": "Github/Repository/Deployment",
"github_repository_environment": "Github/Repository/Environment",
"github_repository_ruleset": "Github/Repository/Ruleset",
"github_repository_sbom": "Github/Repository/SBOM",
"github_repository_vulnerability_alert": "Github/Repository/VulnerabilityAlert",
"github_tag": "Github/Tag",
"github_team_member": "Github/Team/Member",
"github_user": "Github/User",
"github_workflow": "Github/Workflow",
"github_container_package": "Github/Container/Package",
"github_maven_package": "Github/Package/Maven",
"github_npm_package": "Github/NPM/Package",
"github_nuget_package": "Github/Nuget/Package",
"github_artifact_dockerfile": "Github/Artifact/DockerFile",
}
Functions ¶
This section is empty.
Types ¶
type ResourceTypeConfiguration ¶ added in v0.44.12
type ResourceTypeConfiguration struct { Name string `json:"name"` IntegrationType integration.Type `json:"integration_type"` Description string `json:"description"` Params []Param `json:"params"` }
Click to show internal directories.
Click to hide internal directories.