StackGuardian / StackGuardian/tirith

feat(core): `AnyElement` / `NoElement` conditions with an explicit `not` clause flag

Open
#322 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

List quantifiers other than "all". Take a list of clauses {path, type, value, not}: the not
flag is load-bearing because Not* twins exist for only 3 of 13 conditions and are documented as
"not simple negations" — inside a NoElement predicate that asymmetry reports a resource compliant
on a type mismatch. The flag gives negation for all 13 conditions at once and supersedes a
standalone NotRegexMatch
(measured at ~1 unlocked policy on its own). Document that nested
blocks need settings.*.database_flags (the bare dotted form emits severity 2) and that predicate
sub-paths use a different path engine than terraform_resource_attribute. Depends on the R1
skip-ordering and variable-recursion fixes.

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 by locating the existing "all" list-quantifier implementation and the standalone NotRegexMatch condition, then review the R1 skip-ordering and variable-recursion fixes this depends on. The change is done when AnyElement and NoElement accept clauses with an explicit not flag across all 13 conditions, with the documented database_flags and predicate path-engine behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, terraform
Domain
infrastructure, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.