Skip to content

chore(deps): bump actions/attest-build-provenance from 3.2.0 to 4.1.0 in the actions group#28

Merged
heznpc merged 1 commit into
mainfrom
dependabot/github_actions/actions-c74e7b3fc1
May 21, 2026
Merged

chore(deps): bump actions/attest-build-provenance from 3.2.0 to 4.1.0 in the actions group#28
heznpc merged 1 commit into
mainfrom
dependabot/github_actions/actions-c74e7b3fc1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 21, 2026

Copy link
Copy Markdown
Contributor

⚠️ Dependabot is rebasing this PR ⚠️

Rebasing might not happen immediately, so don't worry if this takes some time.

Note: if you make any changes to this PR yourself, they will take precedence over the rebase.


Bumps the actions group with 1 update: actions/attest-build-provenance.

Updates actions/attest-build-provenance from 3.2.0 to 4.1.0

Release notes

Sourced from actions/attest-build-provenance's releases.

v4.1.0

[!NOTE] As of version 4, actions/attest-build-provenance is simply a wrapper on top of actions/attest.

Existing applications may continue to use the attest-build-provenance action, but new implementations should use actions/attest instead.

What's Changed

Full Changelog: actions/attest-build-provenance@v4.0.0...v4.1.0

v4.0.0

[!NOTE] As of version 4, actions/attest-build-provenance is simply a wrapper on top of actions/attest.

Existing applications may continue to use the attest-build-provenance action, but new implementations should use actions/attest instead.

What's Changed

Full Changelog: actions/attest-build-provenance@v3.2.0...v4.0.0

Commits
  • a2bbfa2 bump actions/attest from 4.0.0 to 4.1.0 (#838)
  • 0856891 update RELEASE.md docs (#836)
  • e4d4f7c prepare v4 release (#835)
  • 02a49bd Bump github/codeql-action in the actions-minor group (#824)
  • 7c757df Bump the npm-development group with 2 updates (#825)
  • c44148e Bump github/codeql-action in the actions-minor group (#818)
  • 3234352 Bump @​types/node from 25.0.10 to 25.2.0 in the npm-development group (#819)
  • 18db129 Bump tar from 7.5.6 to 7.5.7 (#816)
  • 90fadfa Bump @​actions/core from 2.0.1 to 2.0.2 in the npm-production group (#799)
  • 57db8ba Bump the npm-development group across 1 directory with 3 updates (#808)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Bumps the actions group with 1 update: [actions/attest-build-provenance](https://github.com/actions/attest-build-provenance).


Updates `actions/attest-build-provenance` from 3.2.0 to 4.1.0
- [Release notes](https://github.com/actions/attest-build-provenance/releases)
- [Changelog](https://github.com/actions/attest-build-provenance/blob/main/RELEASE.md)
- [Commits](actions/attest-build-provenance@96278af...a2bbfa2)

---
updated-dependencies:
- dependency-name: actions/attest-build-provenance
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels May 21, 2026
@dependabot dependabot Bot requested a review from heznpc as a code owner May 21, 2026 00:38
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels May 21, 2026
heznpc added a commit that referenced this pull request May 21, 2026
Adversarial second-pass on commits 01ed305 (PR #26) and ec7045d (PR #27),
both reported as "done / tests pass / CI green". Two Critical findings.

[C1] CodeQL `analyze (actions)` open alert
- Rule: `actions/missing-workflow-permissions`
- File: .github/workflows/cd.yml
- Message: "Actions job or workflow does not limit the permissions of the
  GITHUB_TOKEN."
- Detected by the CodeQL `actions` language matrix that PR #26 itself added.
  PR #26 introduced top-level permissions on most workflows but missed
  cd.yml and setup.yml. The 5 required CI checks didn't include CodeQL,
  so the alert landed silently after merge.
- Fix: add `permissions: contents: read` at workflow top level in cd.yml
  and setup.yml. Jobs continue to opt into the writes they need
  (contents:write / id-token:write / attestations:write for publish;
  issues:write for setup).

[C2] `ok()` and `err()` Response Helpers — dead code marketed as feature
- server.py:41 and server.py:47 defined ok() / err() helpers.
- Zero references anywhere in src/ or tests/ (`grep -rn "\\bok(\\|\\berr("` =
  only the definitions + the introductory comment).
- Coverage report confirmed: server.py:43-44, 49 uncovered.
- README.md:32 and README.ko.md:30 marketed these as "Response Helpers —
  ok() and err() for consistent tool responses" in the "What You Get"
  list — i.e. a public feature claim with no backing code usage.
- The bundled `greet` tool returns plain `str` — the README's marketed
  pattern doesn't match the bundled example.
- FastMCP's idiom is `return value` / `raise on error`; ok/err helpers
  are a raw-MCP-without-FastMCP relic that actively teach the wrong
  pattern.
- Fix: delete ok() / err() / their introductory comment. Replace the
  Tools-section banner comment with one line documenting the actual
  FastMCP idiom. Remove the "Response Helpers" bullet from README.md
  and README.ko.md.

Why this matters beyond cosmetics: a starter is a teaching artifact.
False "What You Get" entries silently propagate the wrong pattern to
every clone. The dead helpers were also reachable code surface that
CodeQL has to scan but no test exercises.

Verification
- All 7 workflows now have top-level `permissions:` (verified via
  `awk` scan of column-1 `permissions:` line).
- ruff / ruff format / mypy strict / pytest 17/17 all clean.
- Coverage 72.12% (improved from 70.64% — uncovered dead code removed).

Out-of-scope for this PR (will be raised as Major findings for user
decision):
- tests/test_tools.py has no `test_greet_registered_on_server` despite
  test_server_info.py and test_code_review.py both having that pattern.
- server_info.py wheel-install fallback path (lines 41-42, 52-56) is 0%
  covered; test only exercises the dev/source-tree read-pyproject path.
- src/my_mcp_server/tools/greet.py defines a `register()` that's never
  called by server.py — fully dead modular example.
- SECURITY.md "branch protection on main" claim is starter-side only;
  clones inherit nothing.
- 4 Dependabot PRs (#28, #29, #30, #31) opened today — #28 is
  attest-build-provenance v3.2.0 → v4.1.0, making our 6-hour-old SHA
  pin already one major behind.
@heznpc

heznpc commented May 21, 2026

Copy link
Copy Markdown
Member

@dependabot rebase

@heznpc heznpc merged commit 8a71862 into main May 21, 2026
8 checks passed
@heznpc heznpc deleted the dependabot/github_actions/actions-c74e7b3fc1 branch May 21, 2026 13:20
heznpc added a commit that referenced this pull request May 28, 2026
Single PR fixes every CONFIRMED + PLAUSIBLE finding from the extra-high-
effort code-review on the post-/simplify range (ec7045d..HEAD).

Workflow bugs (active failures)
-------------------------------
1. dependabot-auto-merge.yml: pre-create `manual-review` label via
   `gh label create --force` before adding it. Previously the workflow
   failed red on every Dependabot major bump (observed on PR #34) because
   the label didn't exist yet.
2. stale.yml: add `dependencies,manual-review` to `exempt-pr-labels` so
   Dependabot major-bump PRs aren't silently closed after 37 days.
5. dependabot-auto-merge.yml major-branch now calls
   `gh pr merge --disable-auto || true` before re-labeling. Without this,
   a Dependabot rebase that promoted a previously-classified minor into
   a major would keep the prior `--auto` enable and silently squash-merge.

Doc drift (user-facing contradictions)
--------------------------------------
3. README.md + README.ko.md project-structure tree: drop the stale
   `tools/greet.py` line; relabel server.py from "+ inline tools + helpers"
   to "+ inline `greet` tool example". Replace README's "Modular
   (recommended for larger servers)" code block (which pointed at a
   deleted example file) with prose pointing at resources/server_info.py
   and prompts/code_review.py as the live `register(mcp)` exemplars.
4. CHANGELOG.md [Unreleased] reset to an empty courtesy stub. The previous
   bullets described attest-build-provenance v3.2.0, stale v10.2.0,
   ruff>=0.15<1, mypy>=2<3, pytest>=8<10, pytest-asyncio>=1<2, a
   `.python-version` file, and a SECURITY.md "feature set" framing — every
   one of those is now superseded by PRs #28-#34 + #27. The file's own
   header already declares GitHub Releases as canonical, so the courtesy
   stub now matches that contract.
6. server.py module docstring + tools-section comment: drop references to
   the deleted greet.py example; reference the live register(mcp) pattern
   in resources/ and prompts/.
   tools/__init__.py is now also deleted (the package was a dead public
   namespace shipping in the wheel after greet.py was removed).
11. setup.yml first-run bootstrap issue: rewrite the `Replace the example
    greet tool` checklist item to point at server.py inline (and mention
    modular split as an option), matching reality.
12. SECURITY.md adds a one-line WARNING above the branch-protection JSON
    that the hardcoded `test (3.11/3.12/3.13)` contexts MUST be updated
    in lockstep with any matrix change — otherwise required checks point
    at jobs that never report.
13. SECURITY.md prepends `gh auth refresh -s admin:repo,security_events`
    so copy-pasters who used the default `gh auth login` scopes don't
    hit opaque 404s on the vulnerability-alerts / automated-security-fixes
    PUTs.

Production code correctness (rename-safety + entry-point testability)
---------------------------------------------------------------------
7+8. resources/server_info.py: replace the two hardcoded `"my-mcp-server"`
     literals with a module-level `PKG_NAME` derived from `__package__`
     (with underscores → hyphens). A clone that renames the package per
     setup.yml's first-run checklist now reports the correct dist name
     in `info://server/status` without a second hardcoded literal to
     remember. Test in tests/test_server_info.py is updated to compare
     `payload["name"]` against `mod.PKG_NAME` and `payload["version"]`
     against `importlib.metadata.version(mod.PKG_NAME)` — both sides
     resolve to the SAME source, so an uncommitted pyproject.toml version
     bump no longer makes the test fail for the wrong reason.
14. __main__.py: extract the try/except wrapper into `run() -> int` and
     guard the call site with `if __name__ == "__main__":`. Importing
     `my_mcp_server.__main__` (IDE auto-import, coverage discovery, etc.)
     no longer blocks on the server loop, and the KeyboardInterrupt /
     Exception arms are now testable.

Test integrity
--------------
6.  tests/test_server_info.py adds `test_read_pyproject_returns_none_when_no_pyproject_anywhere`
    exercising the OUTER `return None` (loop exhaustion at server_info.py:42)
    that the existing wheel-fallback tests bypassed via monkeypatch.
    Coverage on server_info.py jumps 96% → 100%.
9.  tests/test_server_info.py::test_read_pyproject_returns_none_when_project_table_missing
    now installs a spy on `tomllib.load` and asserts EXACTLY ONE pyproject
    was read — so a future refactor that drops the inner `return None` and
    falls through to keep walking gets caught here (the spy would see >1
    load) instead of silently passing because no other pyproject.toml is
    reachable on the way to /.
10. tests/test_server_info.py adds `test_pkg_name_derived_from_package`
    pinning the `PKG_NAME = __package__.split(".")[0].replace("_", "-")`
    contract — a refactor that re-hardcodes the literal would fail here.
15. tests/test_tools.py introduces a `_schema_constraint` helper that
    reads a JSON Schema keyword either at the top of a property OR inside
    an `anyOf` branch, so a future widening of the `greet` signature to
    `Annotated[str | None, Field(...)]` (where pydantic emits `anyOf`)
    fails with a clear schema-shape message instead of `KeyError`.
13. tests/test_main.py (new file, 3 tests): exercise the wrapper's clean
    return / KeyboardInterrupt / Exception arms. The Exception test also
    asserts the traceback is logged via `logging.exception` (silently
    exiting 1 without the log would make production debugging much harder).

Coverage hygiene
----------------
17. pyproject.toml `[tool.coverage.report]`: switch from `exclude_lines`
    (which appended to the default and matched nothing in src/) to
    `exclude_also` with patterns that actually have real or near-real
    matches (`if TYPE_CHECKING:`, `if __name__ == "__main__":`). The
    `pragma: no cover` and `raise NotImplementedError` patterns moved to
    coverage.py's built-in defaults.

Verification
------------
- ruff / ruff format / mypy strict: all clean.
- pytest: 26 passed (was 21; +3 main tests + 2 server_info tests, with
  test_falls_back tightened rather than added).
- Coverage: 70.64% → 97.06% (was 84.69% after the last 2nd-pass session;
  __main__.py 0% → 100%, server_info.py 96% → 100%).

Findings deferred from this PR
------------------------------
None — all 15 from the /code-review JSON output (CONFIRMED + PLAUSIBLE)
are addressed.

Findings REFUTED by verifiers (so no change required):
- C-F1 (GITHUB_TOKEN read-only on Dependabot PRs): empirically false here
  because the workflow declares an explicit `permissions:` block.
- C-F14 (cd.yml top-level permissions cap ci.yml): GitHub docs confirm
  reusable workflows use their own top-level permissions.
- C-F15 (symlink resolution skips tmp_path): pytest's tmp_path on macOS
  already returns the canonical /private/var path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant