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

(CAT-1351) - Fixing linting issue #225

Closed
wants to merge 1 commit into from
Closed

(CAT-1351) - Fixing linting issue #225

wants to merge 1 commit into from

Conversation

Ramesh7
Copy link
Contributor

@Ramesh7 Ramesh7 commented Aug 29, 2023

Summary

Fixing unsafe interpolation linting issue.

Additional Context

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@Ramesh7 Ramesh7 requested a review from a team as a code owner August 29, 2023 13:44
@@ -75,7 +75,7 @@
if ($manage_default_ca_cert) and ($facts['os']['family'] == 'RedHat') {
exec { 'download_install_katello_cert_rpm':
path => ['/usr/bin', '/bin',],
command => "curl -k -o /tmp/katello-ca-consumer-latest.noarch.rpm ${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm && yum -y install /tmp/katello-ca-consumer-latest.noarch.rpm", # rubocop:disable Layout/LineLength
command => ['curl', '-k', '-o', '/tmp/katello-ca-consumer-latest.noarch.rpm', "${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm", '&&', 'yum', '-y', 'install', '/tmp/katello-ca-consumer-latest.noarch.rpm'], # rubocop:disable Layout/LineLength
Copy link

Choose a reason for hiding this comment

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

This isn't valid because it uses shell (see the &&). It can't be safely done this way.

You can split it in a file resource with ${satellite_url}/pub/katello-ca-consumer-latest.noarch.rpm" as the source and then notify a package resource, but you'll always have some intermediate file on disk.

@Ramesh7 Ramesh7 closed this Sep 27, 2023
@rajat-puppet rajat-puppet deleted the CAT-1351 branch June 6, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants