chef / chef/chef

Policyfile compliance phase with audit cookbook is not being skipped

Open
#13,472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Untriaged
Dominant language
Ruby
Stars
8.2k
Forks
2.5k
Avg merge
4d 5h
Merged PRs (30d)
23

Description

Description

When using the audit cookbook due to old dependency with newer chef-client with compliance phase a CB with a policyfile is not honoring compliance_phase false normal attribute from kitchen.yml file. Works fine when using berksfile but not policyfile. When logging into the kitchen instance you can find /tmp/kitchen/dna.json has the audit: compliance_phase: false attribute and when viewing the /tmp/kitchen/nodes/default-centos-7.json you can see at the top the node normal attribute is showing audit: compliance_phase: false and the node default attributes are showing audit: compliance_phase: true

Note: without the audit cookbook present this works as expected and compliance phase doesn't run

Chef Version

18.0.185

Platform Version

centos-7

Replication Case

using cookbook attached run kitchen converge you'll get an error due to profiles unable to be downloaded

Client Output

error due to inspec profile unable to be downloaded from automate

Expected Output

Normal chef-client run finishing successfully and not running compliance phase
test.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached test.zip and kitchen.yml, then run kitchen converge on the CentOS 7 reproduction. Compare audit: compliance_phase in /tmp/kitchen/dna.json with the normal and default node attributes in /tmp/kitchen/nodes/default-centos-7.json. Done means a Policyfile-based run honors compliance_phase false and finishes without running the compliance phase.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.