Skip to content
This repository has been archived by the owner on Sep 19, 2020. It is now read-only.

Create a rule for "execute resource used to install packages" #180

Closed
jtimberman opened this issue Oct 12, 2013 · 4 comments
Closed

Create a rule for "execute resource used to install packages" #180

jtimberman opened this issue Oct 12, 2013 · 4 comments

Comments

@jtimberman
Copy link
Contributor

In a similar idea to FC040 and FC041, I think a rule used to identify when an execute or script block is used to run commands for installing packages would be useful:

  • dpkg
  • rpm
  • yum
  • apt-get/aptitude
@jaymzh jaymzh reopened this Jan 23, 2018
@jaymzh
Copy link
Collaborator

jaymzh commented Jan 23, 2018

This is still a good idea.

@tas50
Copy link
Contributor

tas50 commented Jan 23, 2018

I'd support this sort of rule, but we'd have to make sure to be pretty cautious in how it would be implemented since there's a lot of operations with those tools that don't involve installing/removing packages. We'd want to make sure to run any solution against all cookbooks on Supermarket to check for false positives.

@jaymzh
Copy link
Collaborator

jaymzh commented Jan 24, 2018

that's what # ~FCXXX comments are for! :)

heh, no but seriously, trying to eliminate false-positives if fine for the catchable stuff... but there's actually very little.

(yum|apt) list avail? There's APIs for that in Chef.

(yum|apt) search? wtf

yum-shell - I want this to give you a lint warning, holy hell.

The more legitimate things are mostly in other commands like 'createrepo' and such.

I'm sure there's some legitimate stuff we should try to not warn on, and I'm all for running it over common stuff in supermarket, but we shouldn't hold up good rules because there might be some valid use case. There' TONS of lint rules for which there might be valid use cases.

@tas50
Copy link
Contributor

tas50 commented Aug 28, 2019

Moved over to Cookstyle in chef/cookstyle#257

@tas50 tas50 closed this as completed Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants