StackGuardian / StackGuardian/tirith

fix(providers): dotted keys are addressable from terraform_plan but not from json/kubernetes

Open Beginner friendly
#295 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
165
Forks
42
Avg merge
1d 3h
Merged PRs (30d)
11

Description

terraform_plan resolves each path segment through pydash.get, which honours a backslash escape;
the shared engine used by json and kubernetes does a bare key_path.split('.'), and every
spelling — plain, escaped, bracketed — returns []. A Kubernetes annotation
(metadata.annotations."foo.bar/baz") is reachable from a plan and unreachable from the same
manifest through the json provider.

Fix. Honour the same backslash escape in providers/common.py.

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 in providers/common.py and compare the shared json and kubernetes path handling with terraform_plan's pydash.get behavior. Done when plain, escaped, and bracketed paths containing dotted keys resolve correctly for json and kubernetes manifests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.