Skip to content

Add test to verify GitHub Pages has EnforceHttps enabled #214

@MariusStorhaug

Description

Context

GitHub Pages supports enforcing HTTPS on custom domains and default *.github.io URLs via the EnforceHttps setting. Repositories using Process-PSModule should have this enabled for security.

Request

A test should verify that GitHub Pages is configured with EnforceHttps enabled on the repository.

Acceptance criteria

  • The test checks the repository's Pages configuration for EnforceHttps
  • A repository without HTTPS enforcement is flagged as a test failure or warning
  • The test runs as part of the standard test suite

Technical decisions

To be determined during implementation planning — uses the GitHub Pages API.


Implementation plan

  • Identify the appropriate test location (Test-PSModule or repo configuration tests)
  • Use the GitHub Pages API to retrieve the https_enforced setting
  • Assert that HTTPS enforcement is enabled
  • Handle cases where Pages is not configured on the repository

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions