aws-cloudformation / aws-cloudformation/cloudformation-guard

[Enhancement] Make variables mutable

Open
#479 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
1.4k
Forks
196
Avg merge
3d 6h
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Yes

A clear and concise description of what the problem is.

I've worked through many rules where we need to add or delete data from variables based on occurrences in all Resources.

**Describe the solution you'd like**

Make variables mutable, so data can be added or deleted as user wants and can get better control over rules and cover wide set of rules. Currently, it is immutable and so once defined it cannot be changed.

**Describe alternatives you've considered**

NA

**Additional context**

The best example was, I am trying to write a rule for AWS::EC2:NetworkNaclEntry resources and it fails if same resource ids uses same rule number. So I need to keep track of Refs to Resources Ids and their Rule numbers encountered so far and if for same reource, if rule number is repeated, rule fails.

In current cfn-guard versions, this wouldn't be possible.

Also, let me know if you need more info. Thanks!

Contributor guide

Open the contributing guide

Research direction

The issue does not identify files, tests, or entry points; start by locating how cfn-guard variables are defined and evaluated. Done means rules can add and delete variable data, including tracking resource references and rule numbers for AWS::EC2::NetworkNaclEntry resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.