Environment Setup
Environment Setup
Complete all steps below before starting the exercises.
4.1 Create Enterprise Organization
- Log in to your GitHub Enterprise Cloud account at your GHE.com subdomain
- Navigate to Enterprise settings β Organizations β New organization
- Create a new organization (e.g.,
trust-boundary-workshop) - During creation, select Japan as the Data Residency region
- Verify the organization is created under your
*.ghe.comsubdomain URL
# Your organization URL will look like:
https://YOUR-ENTERPRISE.ghe.com/organizations/trust-boundary-workshop
Note: GHE.com is the dedicated domain for GitHub Enterprise Cloud with Data Residency. It is separate from github.com and has its own subdomain for each enterprise.
4.2 Configure Managed User Accounts (EMUs)
- Navigate to Enterprise settings β People β Members
- Provision at least two EMU test users via your Identity Provider (IdP):
TestUser1β assign Admin role on the organizationTestUser2β assign Member role on the organization
- Verify both users can log in to the GHE.com subdomain
Important: EMU accounts are fully managed by the enterprise. Key restrictions:
- β Cannot fork repositories outside the enterprise
- β Cannot create public repositories
- β Cannot contribute to open-source repos on the same platform
- β All actions are governed by enterprise policy
4.3 Create Organization-Owned Repository
- As
TestUser1(Admin), navigate to your organization - Click New repository
- Configure:
- Name:
trust-boundary-demo - Visibility: Private
- Default branch:
main - Initialize: Add a README
- Name:
- Clone the repository and copy the sample application from this workshop template:
# Clone the new repository
git clone https://YOUR-ENTERPRISE.ghe.com/trust-boundary-workshop/trust-boundary-demo.git
cd trust-boundary-demo
# Copy the sample application from this workshop repo
# (app.py and tests/ are already included in this template repository)
cp /path/to/agentic-devsecops-trust-boundry/app.py .
cp /path/to/agentic-devsecops-trust-boundry/requirements.txt .
cp -r /path/to/agentic-devsecops-trust-boundry/tests .
cp -r /path/to/agentic-devsecops-trust-boundry/.github .
- Review the sample application (
app.py):
# app.py β minimal sample application
import os
def get_config():
"""Read configuration from environment variables."""
port = int(os.getenv("APP_PORT", "8080"))
if not (1 <= port <= 65535):
raise ValueError(f"APP_PORT must be between 1 and 65535, got {port}")
return {
"app_name": os.getenv("APP_NAME", "trust-boundary-demo"),
"environment": os.getenv("APP_ENV", "development"),
"port": port,
}
- Push the sample application to the repository:
git add app.py requirements.txt tests/ .github/
git commit -m "Add sample application and workshop files"
git push origin main
4.4 Configure Branch Protections (Access Control)
- Navigate to Settings β Branches β Branch protection rules
- Click Add branch protection rule
- Configure for the
mainbranch:
| Setting | Value | Reason |
|---|---|---|
| Branch name pattern | main |
Protect the default branch |
| Require a pull request before merging | β Enabled | No direct push to main |
| Required approvals | 1 |
At least one reviewer must approve |
| Include administrators | β Enabled | Even admins follow the rules |
| Require status checks to pass | β Disabled | β οΈ Status checks are configured in Workshop 2 |
| Require signed commits | Optional | Recommended but not required for this workshop |
Warning: Do NOT enable βRequire status checks to pass before mergingβ at this point. Required status checks (CodeQL, dependency review, etc.) are part of Workshop 2 β Secure by Design Guardrails. In this workshop, branch protections serve as access control only.
4.5 Enable Minimal Security Features
- Navigate to Settings β Code security and analysis
- Enable:
- β Secret scanning β Detects exposed secrets in the repository
- Leave the following disabled for now:
- β CodeQL analysis β Configured in Workshop 2
- β Dependency review β Configured in Workshop 2
- β Secret scanning push protection β Configured in Workshop 2
Important: Full GHAS (GitHub Advanced Security) is configured in Workshop 2. In this workshop, we enable only secret scanning to demonstrate that security features exist within the trust boundary. The full security configuration is intentionally deferred.
4.6 Enable Copilot
- Navigate to Organization settings β Copilot β Access
- Enable GitHub Copilot for the organization
- Assign Copilot licenses to both EMU test users
- Navigate to Organization settings β Copilot β Policies:
- β Enable Copilot Chat
- β Enable Copilot coding agent
- Navigate to the
trust-boundary-demorepository:- Settings β Copilot β Coding agent β Enable
# Verify Copilot access via CLI
gh copilot --version
4.7 Network & Access Control
- SSO / IdP: Ensure SAML SSO is configured and enforced for the enterprise
- MFA: Enforce multi-factor authentication for all enterprise members
- IP allowlist (if required): Navigate to Enterprise settings β Authentication security β IP allow list and add your corporate network ranges
Tip: For this workshop, ensure your network allows access to your GHE.com subdomain. If youβre behind a corporate proxy, add
*.ghe.comto your allowlist.
Verify Setup
Tip: Run
scripts/verify-setup.shafter completing all setup steps to confirm your environment is ready.
./scripts/verify-setup.sh