content icon indicating copy to clipboard operation
content copied to clipboard

Github Action Ansible `shell` module changes check

Open mildas opened this issue 1 year ago • 4 comments

Description:

CI check to notify if a Ansible shell/command module usage has been changed. It's preferred to use specific Ansible module rather than abuse shell (command) module. So we want to have shell (command) module used only in approved corner cases when there is no other option.

Review Hints:

~See Compare DS / Generate Diff (pull_request) check and bot PR comments. There is extra commit to trigger the updated CI. The commit must be removed before merging.~ It's seems as it's not possible to show it in CaC/content repo CI before merge. To show the check, I've created extra PR in my private repo - https://github.com/mildas/scap-security-guide/pull/3 (see Compare DS / Generate Diff (pull_request) check and bot PR comments)

mildas avatar May 21 '24 11:05 mildas

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment Open in Gitpod

Oracle Linux 8 Environment Open in Gitpod

github-actions[bot] avatar May 21 '24 11:05 github-actions[bot]

:robot: A k8s content image for this PR is available at: ghcr.io/complianceascode/k8scontent:12014 This image was built from commit: 78f77a5b1ffc7bb04a56c91eef531ceded963528

Click here to see how to deploy it

If you alread have Compliance Operator deployed: utils/build_ds_container.py -i ghcr.io/complianceascode/k8scontent:12014

Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: CONTENT_IMAGE=ghcr.io/complianceascode/k8scontent:12014 make deploy-local

github-actions[bot] avatar May 21 '24 11:05 github-actions[bot]

@matusmarhefka Updated (pushed the change also to my fork PR so it's shown in that GH CI check as well).

mildas avatar May 23 '24 08:05 mildas

Code Climate has analyzed commit 78f77a5b and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2

Note: there is 1 critical issue.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 59.4% (0.0% change).

View more on Code Climate.

qlty-cloud-legacy[bot] avatar May 27 '24 07:05 qlty-cloud-legacy[bot]