[go: up one dir, main page]

Exclude env property when exporting playbook to format

When using the context variable expression ${{playbook as json}} or ${{playbook as yaml}}, the env property on the playbook should be excluded in the exported data. This is primarily a security concern, but also a convenience. The env property contains all the environment variables that were set at the time Antora was run. This property is attached to the playbook for convenience. The environment is already accessible from the env context variable, so it just gets in the way when exporting the playbok.

The env property cannot be marked a non-emumerable on the playbook itself as this makes extensions harder to write (see antora#930 (closed)). However, it can be marked as non-enumerable on a copy of the playbook for this extension.