# Generating collection documentation for PRs with github-docs-build / antsibull-docs

**URL:** <https://forum.ansible.com/t/generating-collection-documentation-for-prs-with-github-docs-build-antsibull-docs/46833>\
**Category:** Collection Development\
**Tags:** news-for-maintainers, infra-and-security, documentation, security, collections, antsibull-docs\
**Created:** [November 26, 2026, 9:01pm UTC](https://forum.ansible.com/t/generating-collection-documentation-for-prs-with-github-docs-build-antsibull-docs/46833 "2026-11-26T21:01:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [November 26, 2026, 9:01pm UTC](https://forum.ansible.com/t/generating-collection-documentation-for-prs-with-github-docs-build-antsibull-docs/46833/1 "2026-11-26T21:01:54Z")

</div>

If you use the shared workflows from the [github-docs-build project](https://github.com/ansible-community/github-docs-build) to generate documentation for PRs in your collection, you should be aware of two important things:

1. The shared workflows for PR generation are ususally used in collection workflows using the `pull_request_target` trigger. 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 Changelog](https://github.blog/changelog/2026-11-02-pull_request_target-blocked-by-default-december-2/)

2. 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 with `pull_request_target`, **you are running untrusted code in such a workflow** , which is exactly what you should **NOT** do in `pull_reuqest_target` workflows.

---

<div class="post-metadata">

**Author:** ![kks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kks/32/10352_2.png) [@kks](https://forum.ansible.com/u/kks)\
**Post date:** [November 26, 2026, 9:45pm UTC](https://forum.ansible.com/t/generating-collection-documentation-for-prs-with-github-docs-build-antsibull-docs/46833/2 "2026-11-26T21:45:37Z")

</div>

How come did we end up in a situation where reading docs and linting will result in untrusted code execution?  
I do not expect answer to this question, it just comes to mind, nothing I can do about it.
