Skip to content

CI policy P0: protect master and require reliable PR status checks #159

Closed as not planned

Description

@masarray

Ringkasan praktis untuk pemilik aplikasi — diperbarui 20 November 2026.

Tanda [x] berarti tahap tersebut sudah ada buktinya; [ ] hanya bagian yang belum terverifikasi. Ini bukan daftar pekerjaan yang harus Anda lakukan sendiri.

Yang sudah selesai dan yang belum — bahasa sederhana

Status sederhana: pengaturan keamanan GitHub belum aktif. Ini BUKAN tes aplikasi yang harus Anda lakukan.

  • CI dan CodeQL telah dijalankan dengan hasil sukses pada pekerjaan landing terbaru.
  • Pada audit 20 Nov 2026, GitHub masih menyatakan master.protected=false dan ruleset kosong. Artinya merge belum diwajibkan melewati pemeriksaan.
  • Tindakan satu kali oleh pemilik repo/admin: buka Settings → Rules → Rulesets dan aktifkan perlindungan master yang mensyaratkan PR serta pemeriksaan wajib. Developer kemudian memverifikasi aturan bekerja.
  • Yang perlu Anda lakukan sekarang: hanya pengaturan GitHub ini bila ingin perlindungan branch; tidak perlu menguji RTU atau aplikasi.

Catatan teknis dan sejarah implementasi (dipertahankan)

Unresolved repository policy — admin-only GitHub Settings

Audited 2026-11-11 after #158 was merged (and #157 independently landed). GitHub REST GET /branches/master returned protected: false, and GET /rulesets returned []. YAML correctness tests cannot force pull-request review or require checks without a repository ruleset/branch protection rule. The connected GitHub action set supports ruleset reads, not ruleset writes; no claim is made that protection was configured.

One-time owner/admin action

Open Repository Settings → Rules → Rulesets → New branch ruleset, target default branch master and set:

  1. Require a pull request before merging (choose review requirements aligned to repo maintainer flow); block force pushes/deletion.
  2. Require successful always-present PR gates: build-test (correctness), hygiene (repository posture), and dependency-review (advisory check). Dependency Review action execution was confirmed on PR CI P2: pin release tags to source SHA and lint Actions workflows selectively #158 run #42970663070, not the disabled placeholder. If GitHub uses a different status context label, select the exact emitted check shown in the Checks UI.
  3. Consider also requiring Validate GitHub Actions YAML with actionlint when GitHub shows this conditional job as a selectable context; it runs when workflow YAML changed and skips for normal commits.
  4. Do not unconditionally require path-filtered CodeQL (or Pages) on docs-only PRs, where those workflows create no check; that can leave PRs stuck on Pending.
  5. Control bypasses/administrator exceptions; avoid automatically forcing expensive full packages on every source change. Consider a merge queue only if throughput justifies it.

Closure evidence

  • Re-read master.protected and/or applicable ruleset and confirm the rules are active.
  • Test a documentation-only PR and a code/workflow PR: both must have required checks satisfied, and an intentionally failing required check must block merge.
  • Keep branch ruleset work separate from release artifact integrity and physical IEC101 protocol FAT.

Related implementation: #151, #152, #154, #155, #158.

Activity

  1. masarray commented on Nov 16, 2026

    @masarray
    OwnerAuthor

    Reverification after v3.6.12 and IEC-101 hardening PR #214 (2026-11-16)

    master latest audited at a8bd9f2f4c2f1cf5aea36a149330e77ada2c9d5d: GitHub GET /branches/master still reports protected=false; GET /rulesets returns []. Correctness checks and exact-source release gates exist but are not administrative merge requirements. This is an open P0 repository governance gap, not solved by code changes.

    Maintainer/admin required (connected GitHub App cannot create/enforce rulesets): Repository Settings → Rules → Rulesets → New branch ruleset; target master, active enforcement. Require PR before merge, disallow force pushes and branch deletion, require build-test, hygiene, and dependency-review based on the exact check contexts shown on actual PRs. Avoid requiring optional CodeQL/Pages jobs that don't run on every PR. Validate with both a docs-only and a C# PR and an intentionally failed check. Preserve operator control over public-release version/tag ownership.

    Track this separately from PR #214 (fail-closed CA-learning and COM reader test fix) and from draft #145; do not close until a ruleset is visibly active and fail-closed merge behavior is verified.

  2. masarray commented on Nov 16, 2026

    @masarray
    OwnerAuthor

    2026-11-16 governance checkpoint (post v3.6.12)

    Current master has protected: false, applicable rulesets: [], despite green exact-source CI and published v3.6.12. Engineering code cannot enforce branch protection. The connected GitHub App exposes reads, but no repository-administration write to create/enable rulesets.

    Owner/admin action requested at Settings → Rules → Rulesets → New branch ruleset, target master, active enforcement:

    • require pull requests, prevent deletion and force push, minimize bypasses;
    • require always-present build-test, hygiene, dependency-review status contexts (verify exact check names on GitHub);
    • don't unconditionally require skipped/path-filtered workflow checks (e.g. CodeQL or actionlint) or CI may deadlock.
    • validate with one docs-only and one code PR (and a failing required-check test).

    Independent engineering hardening is being developed in PR #215 for shared single/A-B CA-learning and safe command-target identity. It must not be mistaken for completing this admin-only governance item. Do not close #159 until REST recheck confirms enabled protection.

  3. masarray commented on Nov 17, 2026

    @masarray
    OwnerAuthor

    2026-11-17 verification — GitHub repository protection still pending

    Live GET /repos/masarray/ARIEC60870/branches/master reports protected: false; /rulesets reports []. The pending release-controller PR #233 and its green PR CI do not enforce branch protection. This is a repository Settings action, not a workflow YAML change.

    One-time admin action remains: configure a ruleset for master requiring PR-based merge and continuously present build-test / hygiene checks, preventing force pushes and deletion, then verify with a docs-only PR and an intentionally failing source PR. Do not unconditionally require path-filtered CodeQL; do not confuse 'Dependency review success' with actual dependency graph review while its opt-in is disabled.

    No attempt was made to bypass permissions or create an admin ruleset from a workflow token. Issue remains open until live ruleset read confirms protection.

  4. masarray commented on Nov 19, 2026

    @masarray
    OwnerAuthor

    Governance recheck — 20 Nov 2026 (kept OPEN)

    On master@5e7a019b7091dd97c5b84cbc93f40665c723983f, GitHub branch metadata still reports protected: false and repository rulesets return []. Green CI, Pages, CodeQL and Dependency Review do not enforce protected merging.

    Owner/admin action remains required: Settings → Rules → Rulesets → create active branch ruleset targeting master; require PR review and consistently emitted correctness/hygiene checks, block force pushes/deletion, and validate a deliberately failing PR cannot merge. The connected GitHub actions available here do not expose ruleset creation. This issue remains open with a concrete administrative dependency and should not be marked complete by a workflow change alone.

  5. masarray commented on Nov 21, 2026

    @masarray
    OwnerAuthor

    Archive closure — 21 November 2026

    Not planned / archived at operator request; critical repository protection remains UNRESOLVED. At latest master@8e58529ca3576dfcd556552604400ee31d971995, REST branch metadata still returned protected=false and repository rulesets returned []. CI, dependency, repository hygiene and CodeQL gates on PR #308 all PASS, but successful workflows are not mandatory branch protection and do not prevent an unchecked direct push. One-time GitHub admin action still required in Settings → Rules → Rulesets: protect master, require PR and appropriate always-present checks; verify enforcement with an intentionally failing check before claiming policy completion. The connected app does not provide a ruleset-write operation here. Closing this tracking issue only for a clean board; it is NOT a security fix. Reopen if enforcing branch protection is prioritized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions