If the author has programming right, I don't see any problems regarding security.
Same here, you can technically do something like this in a Groovy macro, for example. So I don't have anything against this feature as long as the author of the content which call this macro has programming right.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.