jenkins-infra / jenkins-security-scan

GitHub Workflow and Action for the Jenkins Security Scan
MIT License
1 stars 6 forks source link

Running powershell script in pom.xml goals fails on linux only agents #34

Open cotovanu-cristian opened 3 hours ago

cotovanu-cristian commented 3 hours ago

Reproduction steps

  1. In the pom.xml run a powershell script e.g:
    <execution>
    <id>Generate help files</id>
    <phase>generate-resources</phase>
    <goals>
        <goal>run</goal>
    </goals>
    <configuration>
        <target>
            <exec executable="powershell.exe">
                <arg value=".\GenerateHelpFiles.ps1 " />
            </exec>
        </target>
    </configuration>
    </execution>
  2. Run the Jenkins Security Scan on PR

Expected Results

Expected the Scan to execute

Actual Results

The scan failed cause the agent did not have powershell.exe

chrome_ExFVAp8QjC

Anything else?

In the pom.xml we run a powershell script running in the build goals, but the agent building the plugin in the security scan script is a linux agent thus it won't be capable of building the plugin used for the security assesment (https://github.com/jenkinsci/uipath-automation-package-plugin/blob/develop/pom.xml#L120C1-L126C41). What can we do to onboard to the Jenkins Security Scan?

cotovanu-cristian commented 2 hours ago

scan example: https://github.com/jenkinsci/uipath-automation-package-plugin/actions/runs/11416380208/job/31767532043