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

Adjust bash template (group)file_owner to follow symlinks #12214

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Jul 23, 2024

Description:

Adjust bash template groupfile_owner and file_owner to follow symlinks.

Rationale:

Addresses #12162

@Mab879 Mab879 added the Bash Bash remediation update. label Jul 23, 2024
@Mab879 Mab879 added this to the 0.1.74 milestone Jul 23, 2024
Copy link

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

🤖 A k8s content image for this PR is available at:
ghcr.io/complianceascode/k8scontent:12214
This image was built from commit: 07fd359

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:12214

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

Copy link

codeclimate bot commented Jul 23, 2024

Code Climate has analyzed commit 07fd359 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 59.4% (0.0% change).

View more on Code Climate.

@Mab879 Mab879 marked this pull request as draft July 23, 2024 20:47
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Jul 23, 2024
@jan-cerny jan-cerny self-assigned this Jul 24, 2024
@Mab879 Mab879 marked this pull request as ready for review July 24, 2024 14:57
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Jul 24, 2024
@jan-cerny
Copy link
Collaborator

/packit build

Copy link
Collaborator

@jan-cerny jan-cerny left a comment

Choose a reason for hiding this comment

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

jcerny@fedora:~/work/git/scap-security-guide (pr/12214)$ python3 tests/automatus.py rule --libvirt qemu:///system ssgts_rhel9 file_groupowner_etc_issue
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2024-07-25-1552/test_suite.log
INFO - xccdf_org.ssgproject.content_rule_file_groupowner_etc_issue
INFO - Script incorrect_groupowner.fail.sh using profile (all) OK
INFO - Script missing_file_test.pass.sh using profile (all) OK
INFO - Script correct_groupowner.pass.sh using profile (all) OK

@jan-cerny jan-cerny merged commit d9086f6 into ComplianceAsCode:master Jul 25, 2024
95 of 96 checks passed
@Mab879 Mab879 deleted the fix_file_owner_bash branch July 25, 2024 14:35
{{%- endif %}}
{{%- else %}}
chgrp {{{ GID_OR_NAME }}} {{{ path }}}
chgrp -L {{{ GID_OR_NAME }}} {{{ path }}}
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the -L flag is only applicable when used in recursive mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bash Bash remediation update.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants