Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tfsec (v1.28.1) on all platforms #459

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

Kevin-CB
Copy link
Contributor

@Kevin-CB Kevin-CB commented Jan 8, 2023

For #198

This PR add tfsec on all platforms

@lemeurherve
Copy link
Member

lemeurherve commented Jan 9, 2023

Thanks for this new PR @Kevin-CB 👏

FYI there are two issues:

  • the sanity check is apparently running tfsec-checkgen instead of tfsec, and this tool doesn't know the --version flag, thus failing the (Linux) builds
  • This sanity check returning the same error message on Windows surprisingly doesn't fail the corresponding Windows builds (FYI @dduportal 👀)

Copy link
Member

@lemeurherve lemeurherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the culprit for the first issue.

provisioning/ubuntu-provision.sh Outdated Show resolved Hide resolved
provisioning/windows-provision.ps1 Outdated Show resolved Hide resolved
@dduportal
Copy link
Contributor

* This sanity check returning the same error message on Windows surprisingly doesn't fail the corresponding Windows builds (FYI @dduportal 👀)

As far as I can tell (ref. https://github.com/jenkins-infra/packer-images/pull/459/files#diff-40afc0140eabc567a7fffe74f8e456d714ec88e36e9aca911d2e95cd8696a40bR2), the powershell script fails when its instructions fails. Just tested it and it works as expected.

I wonder if the mechanism we use for the sanity check is not the culprit: my powershell-fu is not really good but from https://ss64.com/ps/call.html it looks to me that the exit code is not captured.

#337 is the same (I'm adding more note on the issue to avoid polluting the discussion here)

Copy link
Contributor

@dduportal dduportal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job, thanks a lot! 👏

@dduportal dduportal added enhancement New feature or request dependencies and removed dependencies labels Jan 9, 2023
@dduportal dduportal merged commit 513dfa2 into jenkins-infra:main Jan 9, 2023
@dduportal dduportal mentioned this pull request Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants