-
Notifications
You must be signed in to change notification settings - Fork 54
/
GO-2022-0978.yaml
188 lines (187 loc) · 5.59 KB
/
GO-2022-0978.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
modules:
- module: github.com/open-policy-agent/opa
versions:
- introduced: 0.40.0
fixed: 0.44.0
vulnerable_at: 0.43.0
packages:
- package: github.com/open-policy-agent/opa/ast
symbols:
- Compiler.rewriteWithModifiers
- isBuiltinRefOrVar
- queryCompiler.checkDeprecatedBuiltins
- queryCompiler.checkUnsafeBuiltins
- rewriteWithModifier
- rewriteWithModifiersInBody
- validateWith
- validateWithFunctionValue
derived_symbols:
- Args.Copy
- Args.Vars
- Array.Copy
- Array.Foreach
- Array.Iter
- Array.Until
- ArrayComprehension.Copy
- BeforeAfterVisitor.Walk
- Body.Copy
- Body.Vars
- Call.Copy
- CompileModules
- CompileModulesWithOpt
- Compiler.Compile
- Compiler.GetRulesDynamic
- Compiler.GetRulesDynamicWithOpts
- Compiler.PassesTypeCheck
- ContainsClosures
- ContainsComprehensions
- ContainsRefs
- Copy
- Every.Copy
- Every.KeyValueVars
- Expr.Copy
- Expr.CopyWithoutTerms
- Expr.Vars
- GenericTransformer.Transform
- GenericVisitor.Walk
- Head.Copy
- Head.Vars
- Import.Copy
- IsConstant
- JSON
- JSONWithOpt
- Module.Copy
- Module.UnmarshalJSON
- MustCompileModules
- MustCompileModulesWithOpts
- MustJSON
- MustParseBody
- MustParseBodyWithOpts
- MustParseExpr
- MustParseImports
- MustParseModule
- MustParseModuleWithOpts
- MustParsePackage
- MustParseRef
- MustParseRule
- MustParseStatement
- MustParseStatements
- MustParseTerm
- NewGraph
- ObjectComprehension.Copy
- OutputVarsFromBody
- OutputVarsFromExpr
- Package.Copy
- ParseBody
- ParseBodyWithOpts
- ParseExpr
- ParseImports
- ParseModule
- ParseModuleWithOpts
- ParsePackage
- ParseRef
- ParseRule
- ParseStatement
- ParseStatements
- ParseStatementsWithOpts
- ParseTerm
- Parser.Parse
- Pretty
- QueryContext.Copy
- Ref.ConstantPrefix
- Ref.Copy
- Ref.Dynamic
- Ref.Extend
- Ref.OutputVars
- Rule.Copy
- SetComprehension.Copy
- SomeDecl.Copy
- Term.Copy
- Term.Vars
- Transform
- TransformComprehensions
- TransformRefs
- TransformVars
- TreeNode.DepthFirst
- TypeEnv.Get
- Unify
- ValueMap.Copy
- ValueMap.Equal
- ValueMap.Hash
- ValueMap.Iter
- ValueMap.MarshalJSON
- ValueMap.String
- ValueToInterface
- VarVisitor.Walk
- Walk
- WalkBeforeAndAfter
- WalkBodies
- WalkClosures
- WalkExprs
- WalkNodes
- WalkRefs
- WalkRules
- WalkTerms
- WalkVars
- WalkWiths
- With.Copy
- baseDocEqIndex.AllRules
- baseDocEqIndex.Build
- baseDocEqIndex.Lookup
- bodySafetyTransformer.Visit
- comprehensionIndexNestedCandidateVisitor.Walk
- comprehensionIndexRegressionCheckVisitor.Walk
- metadataParser.Parse
- object.Copy
- object.Diff
- object.Filter
- object.Foreach
- object.Intersect
- object.Iter
- object.Map
- object.Merge
- object.MergeWith
- object.Until
- queryCompiler.Compile
- refChecker.Visit
- refindices.Sorted
- refindices.Update
- rewriteNestedHeadVarLocalTransform.Visit
- ruleArgLocalRewriter.Visit
- ruleWalker.Do
- set.Copy
- set.Diff
- set.Foreach
- set.Intersect
- set.Iter
- set.Map
- set.Reduce
- set.Union
- set.Until
- trieNode.Do
- trieNode.Traverse
- trieTraversalResult.Add
- typeChecker.CheckBody
- typeChecker.CheckTypes
description: |
Open Policy Agent (OPA) is an open source, general-purpose policy engine.
The Rego compiler provides a (deprecated) `WithUnsafeBuiltins` function,
which allows users to provide a set of built-in functions that should be
deemed unsafe and rejected by the compiler if encountered in the policy
compilation stage.
A bypass of this protection is possible when using the `with`
keyword to mock a built-in function that isn't taken into account by
`WithUnsafeBuiltins`.
published: 2022-09-13T17:40:16Z
cves:
- CVE-2022-36085
ghsas:
- GHSA-f524-rf33-2jjr
credit: anderseknert@
references:
- advisory: https://github.com/open-policy-agent/opa/security/advisories/GHSA-f524-rf33-2jjr
- fix: https://github.com/open-policy-agent/opa/pull/4540
- fix: https://github.com/open-policy-agent/opa/pull/4616
- fix: https://github.com/open-policy-agent/opa/commit/25a597bc3f4985162e7f65f9c36599f4f8f55823
- fix: https://github.com/open-policy-agent/opa/commit/3e8c754ed007b22393cf65e48751ad9f6457fee8
- web: https://github.com/open-policy-agent/opa/releases/tag/v0.43.1