Inconsistency with very large hex numbers between sops and ansible
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
If line contains very long hex string, sops strips away quotas from it (because it thinks that there is no type problems and 0x...... is a string), but Ansible (because Python has no limit for integers) thinks it's a number.
The problem:
foo: "0x0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"
on the next edit become:
foo: 0x0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
(no quotes). Ansible see this as a number and write (instead of proper 0x.. form) 514631507721405306298073637848375664226723355710112857507800679889911926255 into file content.
Sops should preserve quotes around strings.
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
Reproduce the issue with the quoted long hexadecimal YAML value shown in the report, then trace SOPS's YAML parsing and serialization path. Compare the next edit with Ansible's interpretation; done means the value remains quoted and is not converted to a decimal integer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, go, python
- Domain
- devops, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100