If you use the shared workflows from the github-docs-build project to generate documentation for PRs in your collection, you should be aware of two important things:
-
The shared workflows for PR generation are ususally used in collection workflows using the
pull_request_targettrigger. This trigger comes with some risk, and GitHub is very soon (December 2nd) introducing new restrictions for running such workflows. If you don’t do anything, your PR docs generation workflows will likely stop working then. You can find more details here: pull_request_target blocked by default December 2 - GitHub ChangelogOne way to prevent this is to create an Actions Policy like this one:
To see what might get disabled, you can check the “Policy Insights” section of your “Actions” repository settings. There you can see workflow runs that would get blocked with the new rules. You can also see warnings in current workflow runs, like this one (there they warn about an upcoming change on November 2nd; apparently it was pushed back to December 2nd).
-
You should make sure that you are using antsibull-docs 2.29.x or newer when generating collection docs - in particular in sensitive workflows that use
pull_request_target! - since that’s the first version that no longer uses ansible-doc to fetch collection documentation. (ansible-doc is only used to fetch ansible-core documentation.) The problem with using ansible-doc is that it will execute code in certain plugins when retrieving documentation! So if you run ansible-doc to extract documentation in a workflow running withpull_request_target, you are running untrusted code in such a workflow, which is exactly what you should NOT do inpull_reuqest_targetworkflows.I wasn’t aware that ansible-doc will execute collection code until recently (and I guess most people aren’t aware of this either, since most plugin documentation can be read without executing code), and I spent some time in the last weeks to make sure that antsibull-docs now by default uses a method which does not rely on ansible-doc. Please make sure that if you use antsibull-docs in a workflow, that you don’t pin to an older version or explicitly configure the docs parsing backend to the previous default.
