The vulnerability, an egress policy bypass via DNS over TCP, resides in the step-security/agent binary, not directly in the step-security/harden-runner GitHub Action's JavaScript code. The harden-runner action is responsible for downloading and executing this agent.
The analysis of the patch that remediates this vulnerability shows that the fix was to update the version of the agent being downloaded. The commit fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 modifies the installAgent function in src/install-agent.ts to download agent version v0.14.4 instead of the vulnerable v0.14.3.
Therefore, the installAgent function is the critical component in the harden-runner action related to this vulnerability. It is the function responsible for provisioning the vulnerable component. During the execution of a GitHub Actions workflow using a vulnerable version of harden-runner, this function would be called, and it would install the agent that allows the egress policy bypass. A runtime profile of the action's execution would show installAgent as part of the setup process that leads to the vulnerable state.