Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pattern succeeds when using wrong value from data #234

Open
joejstuart opened this issue Jun 12, 2023 · 0 comments
Open

pattern succeeds when using wrong value from data #234

joejstuart opened this issue Jun 12, 2023 · 0 comments

Comments

@joejstuart
Copy link

When using a single value in a data file, I seem to get passing results even if the value is wrong. Here is an example. The version is swio 0.1.0-nightly.c36a4776

foo.json

50

tasks.dog

pattern blah = {
  hey: b
}

pattern b = *data::from<"foo.json">

att.json

{
	"hey": 10
}
$ swio eval -i att.json -n tasks::blah -d data/ -p policies/tasks.dog 
{
  "name": {
    "pattern": "tasks::blah"
  },
  "severity": "none",
  "reason": "Because all fields were satisfied"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant