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

Fix 2 ctest shellcheck issues #9398

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

maage
Copy link
Contributor

@maage maage commented Aug 24, 2022

Description:

Some ctest shellcheck fails.

Rationale:

It is nice that ctests pass.

Example of the same issue:

In build/jre/fixes/bash/java_jre_unsigned_applications.sh line 8:
  mkdir -p -m 755 ${JAVA_DIR}
           ^-- SC2174: When used with -p, -m only applies to the deepest directory.

For more information:
  https://www.shellcheck.net/wiki/SC2174 -- When used with -p, -m only applie...

When using mkdir -p there is no need to check if directory exists.

Other possible solution is to drop -m option.
In build/ol7/fixes/bash/accounts_authorized_local_users_sidadm_orasid.sh line 22:
		if [ $(ls -ld "$path" | awk '{print $3}') = "oracle" ]; then
                     ^-- SC2046: Quote this to prevent word splitting.

For more information:
  https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
@openshift-ci openshift-ci bot added the needs-ok-to-test Used by openshift-ci bot. label Aug 24, 2022
@openshift-ci
Copy link

openshift-ci bot commented Aug 24, 2022

Hi @maage. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@github-actions
Copy link

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

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@codeclimate
Copy link

codeclimate bot commented Aug 24, 2022

Code Climate has analyzed commit b51abcb and detected 0 issues on this pull request.

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 42.5% (0.0% change).

View more on Code Climate.

@Mab879 Mab879 added Bash Bash remediation update. JRE labels Aug 24, 2022
@marcusburghardt marcusburghardt self-assigned this Aug 25, 2022
@marcusburghardt marcusburghardt added this to the 0.1.64 milestone Aug 25, 2022
@marcusburghardt
Copy link
Member

The failed tests for Automatus CS8, CS9 and Fedora can be safely waived for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bash Bash remediation update. JRE needs-ok-to-test Used by openshift-ci bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants