This sets permissions: contents: read for the CI workflow. The matching change in Bitcoin Core, bitcoin/bitcoin#36513 for bitcoin/bitcoin#36512, was closed unmerged; see this comment.
Part of #1959.
This sets permissions: contents: read for the CI workflow. The matching change in Bitcoin Core, bitcoin/bitcoin#36513 for bitcoin/bitcoin#36512, was closed unmerged; see this comment.
Part of #1959.
I dropped persist-credentials: false to stay in sync with Core, where review found it adds nothing once the token is read-only (https://github.com/bitcoin/bitcoin/pull/36513#issuecomment-6146223556). The PR now only sets permissions: contents: read.
Give GITHUB_TOKEN only `contents: read`.
Part of #1959.
real-or-random's Concept ACK on #1959 asked to keep this in sync with what Bitcoin Core does, and Core's ci.yml today sets no permissions:.
I closed bitcoin/bitcoin#36513, a similar PR, because @hebasto deemed it controversial and I had been asked to reduce my open PRs. Frankly, I do not understand why the change would be controversial. hebasto found demoting packages to none good in principle but without practical effect on Core's CI, which is true. He also wrote that enforcing permissions on behalf of forks seems outside the project's scope; but a fork gets the workflow file with its permissions: block, and its owner can change it.
I see permissions: contents: read as simple hygiene in software development, but if the criterion is to conform to Core, I will close this PR too.