At creation of Policy.lock.json symbols are already replaced
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 156
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
Description
Within the policy.lock.json (created during "install .\Policyfile.rb") chef symbols like Time.now.utc are already replaced. If the policy file contains something like this:
default['production']['base']['message'] = "This node was hardened by Chef. Policyfile created for 'production' at #{Time.now.utc}\n"
the lockfine will contain this:
"default_attributes": {
"production": {
"base": {
"message": "This node was hardened by Chef. Policyfile created for 'production' at 2019-11-08 09:44:57 UTC\n"
}
}
},
I expet it to be the same as within the policyfile without already executed replacement. Then the question comes up if this replacement is also done before the hash (SHA1/SHA256) calculation of any file. If this is the case it will have impact on the checksum. If for example a date is within a file the checksum changes with each new run of chef install...
Chef Workstation Version
Chef Workstation version: 0.7.4
Platform Version
Windows 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing install .\Policyfile.rb with the Time.now.utc interpolation shown in the issue, then inspect the Policyfile and lockfile generation path. Determine whether symbol replacement occurs during lockfile creation and before file checksums are calculated; done means the behavior and checksum impact are resolved with a documented result or regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100