Comments (4)
Hi @GITOffMuhLawn thanks for the feedback. We are always open to looking into how we can better improve our documentation. I see that the way to handle regex is one of them.
That said while guard in fact does not use a passthrough to the standard rust regex crate, it does use a passthrough to the fancy regex crate. Guard uses /regex/
syntax to tell the engine that we're comparing against a regex pattern.
That said, it's important to note that you have a syntax error here in your example.
the following rule would pass
let bucket = Resources.*[ type == "AWS::S3::Bucket" ]
%bucket !empty
let tag = %bucket.Properties.Tags[ key == /(?i)description/ ]
%tag !empty
using the following yaml file as a test file
Resources:
bucket:
Type: "AWS::S3::Bucket"
Properties:
Tags:
- Key: "DeScrIption"
Value: "my_s3_bucket"
Hope this was sufficient. Please let me know if you'd like any further clarifications.
from cloudformation-guard.
Hi, I'm going to assume the above answer was sufficient and will close this issue.
Feel free to reopen if you require any further clarifications
Thanks,
from cloudformation-guard.
Apologies for the delay. Appreciate the response on this and the clarification on what regex it uses. I was able to figure out after a bit. I genuinely do appreciate you clarifying so I know for sure and I'm not just guessing.
FWIW once I figured out the syntax through a bit of rough trial and error I thought the regex support was far better than what the cfn-guard documentation said it supported. From what I read the guard documentation made it sound like regex was very limited/barely supported.
The problem I've seen with a lot of your documentation is that you all are way too smart and you don't know how to think like someone that isn't very smart (like me). Once someone that's involved with something from the AWS side explains it, it makes complete sense, but you guys are just on a whole other level. Anyone that can create a concept is next level.
from cloudformation-guard.
@GITOffMuhLawn no problem. Appreciate the feedback here on ways we can improve our documentation whether that means adding more of it, or making it easier to understand.
Glad you were able to unblock yourself.
from cloudformation-guard.
Related Issues (20)
- [GENERAL ISSUE] Shouldn't `unresolved` be not `FAIL` but `ERROR` in unit testing? HOT 3
- [Enhancement] Add support to call functions inline
- Intrinsic functions handled differently when testing vs validating HOT 1
- CFN Guard validate does not work correctly when entire rule file is comments HOT 2
- [BUG] `empty` `exists` `!= null` don't work as documented HOT 2
- Check on specific Key Value pair[GENERAL ISSUE] HOT 2
- [BUG] install-guard.sh will fail with exit code 0 if GitHub raises a 403 HOT 2
- [GENERAL ISSUE] sam build fails due to certificate problem HOT 5
- [BUG] cfn-guard validate doesn't produce a parseable json/yaml output in 'custom_message' field HOT 2
- [BUG] Incorrect download URL for pre-built binary HOT 2
- [Enhancement] Show full path to file HOT 3
- [Enhancement] Add support for windows
- Add support for SARIF [Enhancement] HOT 2
- [BUG] cfn-guard error via GitHub Actions HOT 2
- [Enhancement] Only show errors/failures in output HOT 5
- [BUG] Failed rule does not print details of the failure HOT 6
- [Enhancement] Add cspell action to check for spelling errors
- [Documentation] Update docs for all public facing functions, and structs
- [BUG] SAM CLI deployed lambda returns InvalidEntryPoint error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudformation-guard.