Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions github/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ type APIMeta struct {
// GitHub Action macOS runner will originate from.
ActionsMacos []string `json:"actions_macos,omitempty"`

// An array of IP addresses in CIDR format specifying the IP addresses
// GitHub Codespaces will originate from.
Codespaces []string `json:"codespaces,omitempty"`

// An array of IP addresses in CIDR format specifying the IP addresses
// GitHub Copilot will originate from.
Copilot []string `json:"copilot,omitempty"`

// An array of IP addresses in CIDR format specifying the IP addresses
// Dependabot will originate from.
Dependabot []string `json:"dependabot,omitempty"`
Expand Down Expand Up @@ -86,9 +94,16 @@ type APIMetaDomains struct {
Copilot []string `json:"copilot,omitempty"`
Packages []string `json:"packages,omitempty"`
Actions []string `json:"actions,omitempty"`
ActionsInbound *ActionsInboundDomains `json:"actions_inbound,omitempty"`
ArtifactAttestations *APIMetaArtifactAttestations `json:"artifact_attestations,omitempty"`
}

// ActionsInboundDomains represents the domains associated with GitHub Actions inbound traffic.
type ActionsInboundDomains struct {
FullDomains []string `json:"full_domains,omitempty"`
WildcardDomains []string `json:"wildcard_domains,omitempty"`
}

// APIMetaArtifactAttestations represents the artifact attestation services domains.
type APIMetaArtifactAttestations struct {
TrustDomain string `json:"trust_domain,omitempty"`
Expand Down
8 changes: 7 additions & 1 deletion github/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestMetaService_Get(t *testing.T) {

mux.HandleFunc("/meta", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "actions_macos": ["example.com/1", "example.com/2"], "dependabot":["d"], "verifiable_password_authentication": true, "domains":{"website":["*.github.com","*.github.dev","*.github.io","*.example.com/assets","*.example.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.github.com","tuf-repo.github.com","fulcio.github.com","timestamp.github.com"]}}}`)
fmt.Fprint(w, `{"web":["w"],"api":["a"],"hooks":["h"], "git":["g"], "pages":["p"], "importer":["i"], "github_enterprise_importer": ["gei"], "actions":["a"], "actions_macos": ["example.com/1", "example.com/2"], "codespaces": ["cs"], "copilot": ["c"], "dependabot":["d"], "verifiable_password_authentication": true, "domains":{"actions_inbound": { "full_domains": ["github.com"], "wildcard_domains": ["*.github.com"]},"website":["*.github.com","*.github.dev","*.github.io","*.example.com/assets","*.example.com"],"artifact_attestations":{"trust_domain":"","services":["*.actions.github.com","tuf-repo.github.com","fulcio.github.com","timestamp.github.com"]}}}`)
})

ctx := t.Context()
Expand All @@ -93,6 +93,8 @@ func TestMetaService_Get(t *testing.T) {
GithubEnterpriseImporter: []string{"gei"},
Actions: []string{"a"},
ActionsMacos: []string{"example.com/1", "example.com/2"},
Codespaces: []string{"cs"},
Copilot: []string{"c"},
Dependabot: []string{"d"},
API: []string{"a"},
Web: []string{"w"},
Expand All @@ -113,6 +115,10 @@ func TestMetaService_Get(t *testing.T) {
"timestamp.github.com",
},
},
ActionsInbound: &ActionsInboundDomains{
FullDomains: []string{"github.com"},
WildcardDomains: []string{"*.github.com"},
},
},

VerifiablePasswordAuthentication: Ptr(true),
Expand Down
Loading