Skip to content

feat: Expand assessment coverage with new security, hygiene, and governance checks#11

Open
tcardosoMSFT wants to merge 6 commits into
masterfrom
tcardosomsft/assessment-coverage-gaps
Open

feat: Expand assessment coverage with new security, hygiene, and governance checks#11
tcardosoMSFT wants to merge 6 commits into
masterfrom
tcardosomsft/assessment-coverage-gaps

Conversation

@tcardosoMSFT
Copy link
Copy Markdown
Collaborator

Summary

Adds 30+ new assessment checks across 4 categories, consolidating related items for easier review.

🏥 Repository Hygiene (new script: \

epo_hygiene_assessment.py)

  • CODEOWNERS presence (root or .github/)
  • LICENSE presence with SPDX identifier
  • SECURITY.md (disclosure policy)
  • README presence
  • .gitignore presence
  • dependabot.yml/yaml configuration
  • Private Vulnerability Reporting enabled
  • Stale repository detection (>180 days without push)

⚡ Actions Security & Audit (extended \security_assessment.py)

  • GITHUB_TOKEN default permissions (read vs write)
  • Actions can approve PRs (self-approval risk)
  • Allowed actions policy (all/selected/local)
  • Deploy keys audit (write-access keys flagged)
  • Webhooks security (insecure SSL, non-HTTPS)

🏢 Org Governance (extended \idp_assessment.py)

  • Organization-level rulesets (active count, PR requirement)
  • Outside collaborators (count + without 2FA)
  • Org Actions permissions (default perms, allowed actions)
  • Fine-grained PAT policies (pending requests)
  • Code security configurations (existence + enforcement)
  • Copilot settings (seats, public code suggestions)
  • Copilot Premium Requests Budget (spending controls for premium models)

🤖 Copilot Best Practices (extended \�ssess_copilot_repos.py)

  • .github/copilot-instructions.md\ presence
  • \AGENTS.md\ presence
  • .copilotignore\ presence
  • .github/copilot/mcp.json\ (MCP config)

✅ Tests

  • 50 pytest tests covering all new checks with mocked \gh api\ responses
  • All passing

API Endpoints Used

All checks use \gh api\ (GitHub CLI) with standard REST endpoints — no Enterprise-only requirements for core checks.

tcardosoMSFT and others added 6 commits May 19, 2026 16:37
- Add check_actions_security() to assess workflow permissions and allowed actions policy
- Add check_deploy_keys() to audit deploy keys with write access
- Add check_webhooks() to detect insecure webhook configurations
- Update assess_repository_security() to call new check functions
- Update export_to_csv() with new columns for all three checks
- Update print_summary() with Actions/deploy keys/webhooks statistics
- Include new error sources in CSV error aggregation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ignore, mcp.json)

Add check_copilot_files() function that checks for additional Copilot
best practice files beyond the existing directory checks:
- .github/copilot-instructions.md
- AGENTS.md (root level)
- .copilotignore (root level)
- .github/copilot/mcp.json (MCP config)

Updates include:
- New CONFIG keys: copilot_files, copilot_nested_files
- New CSV columns for each file check
- Recommendations column suggesting missing files
- Summary stats showing file adoption percentages
- Parallel execution for file checks alongside dir checks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add six new check functions for comprehensive org governance:
- check_org_rulesets: Org-level rulesets and PR requirements
- check_outside_collaborators: Audit external collaborators and 2FA
- check_org_actions_permissions: Actions workflow permissions
- check_pat_policies: Fine-grained PAT request monitoring
- check_code_security_config: Code security configurations
- check_copilot_settings: Copilot billing and policy settings

Update assess_organization orchestrator, CSV export with new columns,
and print_summary with new governance statistics sections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
New script that checks repositories for essential hygiene files and
configurations: CODEOWNERS, LICENSE, SECURITY.md, README, .gitignore,
dependabot.yml, Private Vulnerability Reporting, and stale repo detection.

Follows existing patterns: CONFIG dict, ThreadPoolExecutor parallel
execution, rate limiting, CSV export with timestamps, and unicode
status indicators.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Query org copilot/policies endpoint for premium budget limits
- Fall back to billing response for budget fields
- Add 'Copilot Premium Budget Set' and 'Copilot Premium Budget Limit' CSV columns
- Update Copilot Status to require premium budget for pass
- Add Copilot Governance section to print_summary with budget stats

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Tests cover:
- Repo hygiene: CODEOWNERS, LICENSE, SECURITY.md, dependabot, stale repos
- Security: Actions permissions, deploy keys, webhooks
- IDP: Org rulesets, outside collaborators, Actions perms, code security
  configs, Copilot settings with premium budget, PAT policies
- Copilot: copilot-instructions.md, AGENTS.md, .copilotignore, MCP config

50 tests, all passing with mocked gh API calls.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant