Skip to content

chore: nolint gosec#302

Merged
tenthirtyam merged 1 commit intomainfrom
chore/nolint-gosec
May 12, 2025
Merged

chore: nolint gosec#302
tenthirtyam merged 1 commit intomainfrom
chore/nolint-gosec

Conversation

@tenthirtyam
Copy link
Copy Markdown
Collaborator

@tenthirtyam tenthirtyam commented May 9, 2025

Description

Adds //nolint:gosec for:

  • Expected permission value for .plist file.
  • Expected permission value for sample .vmx file for tests.
  • Expected permission value for sample .lock file for tests.
  • Sample PEM file for tests.

Suppression of gosec linting warnings:

Test-specific changes:

  • Added //nolint:gosec comments to the testPem constant and after the RSA private key block in TestSSHConfigPrepare_SSHPrivateKey to suppress linting warnings for hardcoded credentials in test files. (builder/vmware/common/ssh_config_test.go, [1] [2]
packer-plugin-vmware on  chore/nolint-gosec [!?] via 🐹 v1.24.3 took 11.6s 
➜ make build

packer-plugin-vmware on  chore/nolint-gosec [!?] via 🐹 v1.24.3 took 5.3s 
➜ make dev
packer plugins install --path packer-plugin-vmware "github.com/hashicorp/vmware"
Successfully installed plugin github.com/hashicorp/vmware from /Users/johnsonryan/Downloads/packer-plugin-vmware/packer-plugin-vmware to /Users/johnsonryan/.packer.d/plugins/github.com/hashicorp/vmware/packer-plugin-vmware_v1.1.1-dev_x5.0_darwin_amd64

packer-plugin-vmware on  chore/nolint-gosec [!?] via 🐹 v1.24.3 took 5.1s 
➜ make test
?       github.com/hashicorp/packer-plugin-vmware       [no test files]
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/common 6.807s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/iso    2.158s
ok      github.com/hashicorp/packer-plugin-vmware/builder/vmware/vmx    2.605s
?       github.com/hashicorp/packer-plugin-vmware/version       [no test files]

Adds `//nolint:gosec` for:
- Expected permission value for `.plist` file.
- Expected permission value for sample `.vmx` file for tests.
- Expected permission value for sample `.lock` file for tests.
- Sample PEM file for tests.
@tenthirtyam tenthirtyam added this to the v1.2.0 milestone May 9, 2025
@tenthirtyam tenthirtyam requested a review from JenGoldstrich May 9, 2025 14:57
@tenthirtyam tenthirtyam self-assigned this May 9, 2025
@tenthirtyam tenthirtyam requested a review from a team as a code owner May 9, 2025 14:57
@tenthirtyam tenthirtyam merged commit 0141a91 into main May 12, 2025
14 checks passed
@tenthirtyam tenthirtyam deleted the chore/nolint-gosec branch May 12, 2025 19:32
@github-actions
Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

chore Chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants