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

Flag sensitive execute and file resources #199

Merged
merged 1 commit into from
Aug 10, 2015
Merged

Conversation

scarvalhojr
Copy link
Contributor

Use sensitive attribute on execute and file resources that may expose
sensitive data. This avoids keys and secrets appearing on chef-client
logs.

@scarvalhojr
Copy link
Contributor Author

Foodcritic isn't recognising the sensitive attribute. It seems that a fix is on the way though: Foodcritic/foodcritic#289

@guilhem
Copy link
Contributor

guilhem commented Apr 30, 2015

I agree with this feature, but it seems to be only for chef12. Can you add a test (defined? maybe) to not fail on chef11?

@scarvalhojr
Copy link
Contributor Author

I've added a check for old Chef servers.

@guilhem
Copy link
Contributor

guilhem commented Apr 30, 2015

@scarvalhojr do you test it on chef11? I fear some problem like here: https://github.com/opscode-cookbooks/aws/pull/110/files#r25011292

@scarvalhojr
Copy link
Contributor Author

I'm actually running this on a Chef server 11.1 and chef-client 11.12.8 without the need to check if sensitive is supported. If you prefer to be on the safe side and use instance_methods.include, I'm happy to do it.

@guilhem
Copy link
Contributor

guilhem commented Apr 30, 2015

I really prefer your way ;)
If it works let's go for it. I will test it on TK.

@hufman I'm waiting your go

@scarvalhojr
Copy link
Contributor Author

Let me know how your test goes and if you need any changes.

@scarvalhojr
Copy link
Contributor Author

@guilhem, did you manage to test this change? I have another change for the client LWRP and I'm wondering if I should keep the sensitive attribute or not. Thanks

@scarvalhojr
Copy link
Contributor Author

Can't seem to silence Foodcritic's false positive...

@hufman
Copy link
Contributor

hufman commented Jul 8, 2015

Try making the ~FC009 comment be attached to the first line of the file resource, and not to the actual attribute. This commit seems to do this, and the error message points to the first line of the resource.

Otherwise it looks great!

@hufman
Copy link
Contributor

hufman commented Aug 5, 2015

Can you rebase this to the current master? I merged a bunch of PRs and caused this one to conflict, I'm sorry!

Use sensitive attribute on execute and file resources that may expose
sensitive data. This avoids keys and secrets appearing on chef-client
logs.
@scarvalhojr
Copy link
Contributor Author

Done

On Wed, Aug 5, 2015 at 7:24 PM, Walter Huf notifications@github.com wrote:

Can you rebase this to the current master? I merged a bunch of PRs and
caused this one to conflict, I'm sorry!


Reply to this email directly or view it on GitHub
#199 (comment).

@hufman
Copy link
Contributor

hufman commented Aug 10, 2015

Looks good to me!

hufman added a commit that referenced this pull request Aug 10, 2015
Flag sensitive execute and file resources
@hufman hufman merged commit 6c0cb62 into ceph:master Aug 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants