Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f24cf01
Merge pull request #726 from github/combine-prs-branch
djdefi May 30, 2024
8dcf3c2
Bump the npm_and_yarn group across 3 directories with 2 updates
dependabot[bot] Jul 12, 2024
e2f2e05
Create SUPPORT.md
djdefi Sep 5, 2024
bcaa510
Merge pull request #732 from github/dependabot/npm_and_yarn/api/javas…
djdefi Sep 6, 2024
aee0b2b
Merge pull request #738 from github/support-md
djdefi Sep 6, 2024
beb3f73
Bump micromatch
dependabot[bot] Sep 6, 2024
9d1a135
Bump the bundler group across 3 directories with 3 updates
dependabot[bot] Sep 6, 2024
7d53896
Create org-list-outside-collaborators-by-repo.graphql
gennaropalma Sep 30, 2024
1edb195
Update organization login to ORG_NAME
gennaropalma Oct 22, 2024
fcd5900
Merge pull request #742 from github/gennaropalma-org-oc
sn2b Oct 23, 2024
227e2dc
Merge pull request #740 from github/dependabot/bundler/api/ruby/build…
djdefi Nov 5, 2024
e92f650
Merge pull request #739 from github/dependabot/npm_and_yarn/graphql/e…
djdefi Nov 5, 2024
fbc89c1
Add new GraphQL queries for IP allow lists
jusuchin85 Nov 19, 2024
58cbb38
Rename existing files to match their scope
jusuchin85 Nov 19, 2024
0862276
Use generic variables for orgs and enterprises
jusuchin85 Nov 19, 2024
aff3f7e
Update to use a standard organization variable
jusuchin85 Nov 19, 2024
10b3fb7
Remove setting the clientMutationId variable
jusuchin85 Nov 19, 2024
68de171
Add additional enabling/disabling IP allow lists
jusuchin85 Nov 19, 2024
5717604
Merge pull request #757 from github/jusuchin85/2024-11-19_graphql_ip-…
jusuchin85 Nov 20, 2024
65fdcc5
Create `.graphql` files for checking 2FA status of enterprise members…
bss-mc Nov 25, 2024
c390d9b
Update graphql/queries/enterprise-outside-collaborators-2fa-insecure.…
bss-mc Nov 26, 2024
e5d5c0f
Merge pull request #759 from github/bss-mc-2fa-ent-graphql-examples
bss-mc Nov 26, 2024
bdd3375
Create devcontainer.json
Pandatabe223 Jan 1, 2025
946ae7b
Update devcontainer.json
Pandatabe223 Jan 26, 2026
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
5 changes: 5 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#/ AUTHOR: @IAmHughes{
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
}
}
8 changes: 8 additions & 0 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Support

This repository contains sample code provided by GitHub for demonstration purposes.

- **No Official Support**: These samples are provided "as-is" without official support.
- **Use at Your Own Risk**: Intended for learning and experimentation, not for production use.

Thank you for understanding.
2 changes: 1 addition & 1 deletion api/javascript/es2015-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
},
"author": "@k33g",
"dependencies": {
"node-fetch": "^1.6.3"
"node-fetch": "^3.3.2"
}
}
6 changes: 3 additions & 3 deletions api/javascript/gha-cleanup/package-lock.json

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

2 changes: 1 addition & 1 deletion api/ruby/building-a-ci-server/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source "https://rubygems.org"
gem "json", "~> 2.3"
gem "octokit", "~> 3.0"
gem "shotgun"
gem "sinatra", "~> 2.2.3"
gem "sinatra", "~> 4.0.0"
25 changes: 15 additions & 10 deletions api/ruby/building-a-ci-server/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,34 @@ GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
base64 (0.2.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
json (2.3.0)
multipart-post (2.0.0)
mustermann (2.0.2)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
octokit (3.0.0)
sawyer (~> 0.5.3)
rack (2.2.8.1)
rack-protection (2.2.3)
rack
rack (3.1.7)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
ruby2_keywords (0.0.5)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
shotgun (0.9)
rack (>= 1.0)
sinatra (2.2.3)
mustermann (~> 2.0)
rack (~> 2.2)
rack-protection (= 2.2.3)
sinatra (4.0.0)
mustermann (~> 3.0)
rack (>= 3.0.0, < 4)
rack-protection (= 4.0.0)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
tilt (2.0.11)
tilt (2.4.0)

PLATFORMS
ruby
Expand All @@ -33,7 +38,7 @@ DEPENDENCIES
json (~> 2.3)
octokit (~> 3.0)
shotgun
sinatra (~> 2.2.3)
sinatra (~> 4.0.0)

BUNDLED WITH
1.11.2
2 changes: 1 addition & 1 deletion api/ruby/delivering-deployments/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ source "https://rubygems.org"
gem "json", "~> 2.3"
gem "octokit", "~> 3.0"
gem "shotgun"
gem "sinatra", "~> 2.2.3"
gem "sinatra", "~> 4.0.0"
25 changes: 15 additions & 10 deletions api/ruby/delivering-deployments/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,34 @@ GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
base64 (0.2.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
json (2.3.0)
multipart-post (2.0.0)
mustermann (2.0.2)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
octokit (3.0.0)
sawyer (~> 0.5.3)
rack (2.2.8.1)
rack-protection (2.2.3)
rack
rack (3.1.7)
rack-protection (4.0.0)
base64 (>= 0.1.0)
rack (>= 3.0.0, < 4)
rack-session (2.0.0)
rack (>= 3.0.0)
ruby2_keywords (0.0.5)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
shotgun (0.9)
rack (>= 1.0)
sinatra (2.2.3)
mustermann (~> 2.0)
rack (~> 2.2)
rack-protection (= 2.2.3)
sinatra (4.0.0)
mustermann (~> 3.0)
rack (>= 3.0.0, < 4)
rack-protection (= 4.0.0)
rack-session (>= 2.0.0, < 3)
tilt (~> 2.0)
tilt (2.1.0)
tilt (2.4.0)

PLATFORMS
ruby
Expand All @@ -33,7 +38,7 @@ DEPENDENCIES
json (~> 2.3)
octokit (~> 3.0)
shotgun
sinatra (~> 2.2.3)
sinatra (~> 4.0.0)

BUNDLED WITH
1.11.2
6 changes: 3 additions & 3 deletions api/ruby/rendering-data-as-graphs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
concurrent-ruby (1.2.2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
Expand Down Expand Up @@ -39,7 +39,7 @@ GEM
multipart-post (2.3.0)
octokit (4.7.0)
sawyer (~> 0.8.0, >= 0.5.3)
public_suffix (5.0.1)
public_suffix (6.0.1)
rack (1.6.13)
rack-protection (1.5.5)
rack
Expand Down
20 changes: 10 additions & 10 deletions graphql/enterprise/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"

braces@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
braces@^3.0.2, braces@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
dependencies:
fill-range "^7.0.1"
fill-range "^7.1.1"

busboy@^1.6.0:
version "1.6.0"
Expand Down Expand Up @@ -473,9 +473,9 @@ fbjs@^0.8.9:
setimmediate "^1.0.5"
ua-parser-js "^0.7.9"

fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
fill-range@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
dependencies:
to-regex-range "^5.0.1"

Expand Down Expand Up @@ -695,10 +695,10 @@ meros@^1.1.4, meros@^1.2.1:
resolved "https://registry.yarnpkg.com/meros/-/meros-1.2.1.tgz#056f7a76e8571d0aaf3c7afcbe7eb6407ff7329e"

micromatch@^4.0.4:
version "4.0.5"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6"
version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
dependencies:
braces "^3.0.2"
braces "^3.0.3"
picomatch "^2.3.1"

minimatch@4.2.1:
Expand Down
25 changes: 25 additions & 0 deletions graphql/queries/enterprise-get-ip-allow-list.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Grab current IP allow list settings for an enterprise.
# This includes:
# - The IP allow list entries
# - The IP allow list enabled setting
# - The IP allow list for GitHub Apps enabled setting

query GetEnterpriseIPAllowList {
enterprise(slug: "ENTERPRISE_SLUG") {
owner_id: id
enterprise_slug: slug
enterprise_owner_info: ownerInfo {
is_ip_allow_list_enabled: ipAllowListEnabledSetting
is_ip_allow_list_for_github_apps_enabled: ipAllowListForInstalledAppsEnabledSetting
ipAllowListEntries(first: 100) {
nodes {
ip_allow_list_entry_id: id
ip_allow_list_entry_name: name
ip_allow_list_entry_value: allowListValue
ip_allow_list_entry_created: createdAt
is_ip_allow_list_entry_active: isActive
}
}
}
}
}
28 changes: 28 additions & 0 deletions graphql/queries/enterprise-members-2fa-disabled.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This GraphQL query will list any enterprise members who have yet to enable 2FA on their personal GitHub account.
# This does not list any outside collaborators, and will not work with Enterprise Managed Users other than the setup user.

query GetEnterpriseMembersWith2faDisabled {
enterprise(slug: "ENTERPRISE_SLUG") {
enterprise_id: id
enterprise_slug: slug
members_with_no_2fa: members(
first: 100
twoFactorMethodSecurity: DISABLED
) {
num_of_members: totalCount
edges {
node {
... on EnterpriseUserAccount {
login
}
}
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
}
}
}
28 changes: 28 additions & 0 deletions graphql/queries/enterprise-members-2fa-insecure.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This GraphQL query will list any enterprise members who have enabled 2FA on their GitHub account, but amongst their 2FA methods is SMS (which is deemed insecure).
# This does not list any outside collaborators, and will not work with Enterprise Managed Users other than the setup user.

query GetEnterpriseMembersWithInsecure2fa {
enterprise(slug: "ENTERPRISE_SLUG") {
enterprise_id: id
enterprise_slug: slug
members_with_insecure_2fa: members(
first: 100
twoFactorMethodSecurity: INSECURE
) {
num_of_members: totalCount
edges {
node {
... on EnterpriseUserAccount {
login
}
}
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
}
}
}
28 changes: 28 additions & 0 deletions graphql/queries/enterprise-members-2fa-secure.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This GraphQL query will list any enterprise members who have enabled 2FA on their GitHub account with a secure (non-SMS) method.
# This does not list any outside collaborators, and will not work with Enterprise Managed Users other than the setup user.

query GetEnterpriseMembersWithSecure2fa {
enterprise(slug: "ENTERPRISE_SLUG") {
enterprise_id: id
enterprise_slug: slug
members_with_secure_2fa: members(
first: 100
twoFactorMethodSecurity: SECURE
) {
num_of_members: totalCount
edges {
node {
... on EnterpriseUserAccount {
login
}
}
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This GraphQL query will list any outside collaborators in an enterprise who have yet to enable 2FA on their GitHub account.

query GetEnterpriseollaboratorsWith2faDisabled {
enterprise(slug: "ENTERPRISE_SLUG") {
enterprise_id: id
enterprise_slug: slug
enterprise_owner_info: ownerInfo {
collaborators_with_no_2fa: outsideCollaborators(
twoFactorMethodSecurity: DISABLED
first: 100
) {
num_of_collaborators: totalCount
nodes {
login
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This GraphQL query will list any outside collaborators in an enterprise who have enabled 2FA on their GitHub account, but amongst the 2FA methods is SMS (which is deemed insecure).

query GetEnterpriseCollaboratorsWithInsecure2fa {
enterprise(slug: "ENTERPRISE_SLUG") {
enterprise_id: id
enterprise_slug: slug
enterprise_owner_info: ownerInfo {
collaborators_with_insecure_2fa: outsideCollaborators(
twoFactorMethodSecurity: INSECURE
first: 100
) {
num_of_collaborators: totalCount
nodes {
login
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
}
}
}
}
Loading