There should be a feature or recipe so that outbound network traffic would be logged or displayed, so that one can see and/or control the network traffic from the script, e.g. for spotting information exfiltration.
Most likely, this can be done by adding a proxy and a firewall component, e.g. iptables and either squid or mitmproxy