Shivam Kumar
48b7a68733
Added propagationPolicy to TTL controller for resource deletion ( #11207 )
...
* Added propagationPolicy to TTL controller for resource deletion
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Added per-resource deletion policy with optional global default
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Fix: Added nil check for annotations to prevent runtime errors
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Fix: Moved logic for retrieving propagation policy from annotations to a dedicated function
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Fix: Resolve merge conflict in controller.go and update propagation policy handling
- Added missing gvr field from main branch
- Improved annotation naming as per team discussion
- Moved propagation policy logic closer to usage
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Simplified propagation policy logic
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Add unit tests for controller.go
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
* Removed the test file for controller.go and fixed the lint error
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
---------
Signed-off-by: ShivamJha2436 <shivamkumar87148@gmail.com>
2024-09-27 14:45:09 +00:00
shuting
e2ffdef81c
chore: pin go.opentelemetry.io/otel/semconv/v1.24.0 ( #11256 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-27 16:39:55 +05:30
Yukun Wang
7763ff72cf
fix: foreach list validation ( #11222 )
...
Signed-off-by: airycanon <airycanon@airycanon.me>
2024-09-26 08:49:35 +00:00
Charles-Edouard Brétéché
82f4ca9034
fix: policy status updates not stabilising ( #11236 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-25 13:44:39 +00:00
Mariam Fahmy
1331209b19
feat: add dumpPatch flag ( #11237 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-09-25 13:11:43 +00:00
Charles-Edouard Brétéché
3de1cb3f4f
fix: webhooks reconciliation with policies ( #11233 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-25 12:12:08 +00:00
Charles-Edouard Brétéché
bfb00cffc8
fix: webhooks reconciliation when no policies ( #11230 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-25 11:08:03 +00:00
Khaled Emara
e3b51e16a9
fix(webhook): error variable ( #11225 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-09-25 09:41:17 +00:00
Khaled Emara
9541608182
fix(status): status comparison is wrong ( #11203 )
...
* fix(status): status comparison is wrong
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* fix(status): retry status update after first failure
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-24 15:17:38 +00:00
shuting
2d601a0830
feat: allow generate pattern changes ( #11202 )
...
* chore: remove duplicate test steps
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: remove validation checks upon generate policy changes
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: return nil
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: chainsaw tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: restrict rule spec changes except for generate pattern
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: rename tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: unit tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: upadte e2e matrix
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-24 14:11:14 +00:00
Mariam Fahmy
8eb081475e
fix: skip processing the oldObject for audit policies ( #10233 )
...
* fix: skip processing the oldObject for audit policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: modify error and skip messages
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: modify the log level
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-09-20 12:28:18 +00:00
shuting
65782d37f8
chore: add more chainsaw tests for generate.foreach
( #11140 )
...
* chore: rename tests
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-data-sync-update-policy
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-data-sync-update-target
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-clone-sync-update-source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-clone-sync-update-target
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-clone-list-sync-update-source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: rename vars in cpol-clone-list-sync-update-source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-clone-list-sync-update-target
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add test/conformance/chainsaw/generate/foreach/existing/cpol-data-sync-create
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* tests: add cpol-clone-list-sync-create
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-18 10:54:33 +00:00
Mariam Fahmy
b0588afba1
fix: remove unused functions ( #11190 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-09-18 10:08:45 +00:00
Pradeep Lakshmi Narasimha
1ab1897d2c
fix: Added missing label info in the cleanup metrics ( #10321 ) ( #11147 )
...
Signed-off-by: Pradeep Lakshmi Narasimha <pradeep.vaishnav4@gmail.com>
2024-09-16 08:57:59 +00:00
Vishal Choudhary
ea19244876
fix: expect base64 string in raw tuf root ( #11117 )
...
* fix: expect base64 string in raw tuf root
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: rename kyverno yaml file
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-12 12:34:52 +00:00
Charles-Edouard Brétéché
b463ee40d2
feat: use pointer in rule (validate field) ( #11095 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-11 09:12:53 +00:00
Vishal Choudhary
71f29d011c
fix: make webhook cleanup setup optional and add cleanup ci test ( #11077 )
...
* fix: make webhook cleanup setup optional and add cleanup ci test
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add logging
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add validating webhook count check
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-11 08:38:45 +02:00
Charles-Edouard Brétéché
e7e2f0a07f
feat: use pointer in rule (mutation field) ( #11078 )
...
* feat: use pointer in rule (mutation field)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-11 04:32:10 +03:00
Charles-Edouard Brétéché
b5e1c97913
feat: use pointer in rule (exclude field) ( #11050 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-10 11:14:49 +00:00
shuting
1b1b90ed93
fix: avoid generating empty urs ( #11065 )
...
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-10 09:42:16 +00:00
Jim Bugwadia
ce5cd476df
support HTTP headers in service API calls ( #11041 )
...
* support HTTP headers in service API calls
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* generate CRDs
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix chunked tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix POST call
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-09 21:04:08 +00:00
Charles-Edouard Brétéché
d5dcd4611d
feat: use pointer in rule ( #11037 )
...
* feat: use pointer in rule
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix unit tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix policy controller
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-09 21:10:02 +08:00
Khaled Emara
0a4c14eb82
fix(status): don't get the policy twice before status update ( #11026 )
...
* fix(status): don't compare uid
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(webhook): logger message
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-09-09 18:30:26 +08:00
Vishal Choudhary
1ef9b876e1
fix: allow changes to preexisting resources that violate a validate foreach, cel or pss policy ( #10033 )
...
* feat: allow changes to preexisting resources that violate a validate foreach, cel or pss policy
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: do old object verification as create operation
this fixes the case where we are checking request.operation in a deny condition
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: update the json context in set operation
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: typo
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: update error message
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add match and exclude check
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: match exclude in if
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add option to disable validation of old object
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: unit tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: chainsaw tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: update readme
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: conflicts
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: chainsaw tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: ci
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: nil ptr error
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: linter
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: linter
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: old obj verification in assert
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: codegen
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: chainsaw tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: chainsaw test for assert
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: cleanup
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: chainsaw tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: pss
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: common functions for allow existing violations
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: types
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: typos
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: pss old resource
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: chainsaw test for PSS
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: use old objects
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: more merge changes
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: e2e matrxix
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: refactor and dont return error when old obj validation fails
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: return resp when not matched
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add logs and return skip when old object validation fails
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* Update validate_resource.go
Co-authored-by: shuting <shutting06@gmail.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* Update validate_pss.go
Co-authored-by: shuting <shutting06@gmail.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* Update validate_assert.go
Co-authored-by: shuting <shutting06@gmail.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: shuting <shutting06@gmail.com>
2024-09-06 06:42:56 +00:00
Charles-Edouard Brétéché
02e27ec3d4
fix: unsupported defaults in api ( #11021 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-05 14:48:47 +00:00
Anushka Mittal
37ab9ba824
fix: range through all resources to build webhook ( #10748 )
...
* fix: range through all resources to build webhook
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: add tests
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: correct conformance
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: correct conformance pod all subresources
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: append resource when operations and scope is same
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: correct tests
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: chainsaw tests
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: flaky test
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: remove debug lines
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
---------
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
Co-authored-by: anushkamittal20 <anumittal4641@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-05 11:42:40 +00:00
Charles-Edouard Brétéché
bc0f83b175
feat: remove yaml markers ( #11015 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-05 11:13:16 +00:00
D N Siva Sathyaseelan
0ee73430de
feat:Add support for condition validation across multiple image verification attestations or context entry ( #9960 )
...
* added Validate in ImageVerification
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* added Validate in ImageVerification
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* validate block added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* Name feild is added in Attestation struct
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* added imageInfo in policy context
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added response from FetchAttestations to contex entry
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added validate logic
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* condition for name collision in Attestation array is added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added multiple image verification test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added multiple image verification test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* unit test added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* ValidateVariable is applied in validate
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* change in regex, logic, conformance test, unit test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some change in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* context entries are added as variables
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical implementations
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Validate and multiple Image verification is working
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* moved validate to verify
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in imageverifier
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in imageverifier
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* unit test added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added validate in verifyimage in v2 policies
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* validate is moved to verifyAttestation
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* removed loadcontext
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* enhanced tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* enhanced tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Added getRawResp to fing report in statemants
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* aome changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* aome changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in ivm
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* changes in verify in imageverifer
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test for trivy and vex
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added Validate in ImageVerification
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* added Validate in ImageVerification
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
* added imageInfo in policy context
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added response from FetchAttestations to contex entry
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added validate logic
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* condition for name collision in Attestation array is added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added multiple image verification test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added multiple image verification test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* unit test added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* ValidateVariable is applied in validate
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* change in regex, logic, conformance test, unit test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some change in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* context entries are added as variables
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some logical implementations
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Validate and multiple Image verification is working
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* moved validate to verify
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in conformance test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in imageverifier
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Some changes in imageverifier
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* unit test added
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* lint fixes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added validate in verifyimage in v2 policies
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* validate is moved to verifyAttestation
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* removed loadcontext
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* enhanced tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* enhanced tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* Added getRawResp to fing report in statemants
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* aome changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* aome changes in unit tests
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* helm test fix
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* some changes in ivm
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* changes in verify in imageverifer
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* test
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* codegen applied
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* codegen resolved
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
---------
Signed-off-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
Signed-off-by: D N Siva Sathyaseelan <95441117+sivasathyaseeelan@users.noreply.github.com>
Co-authored-by: sivasathyaseeelan <dnsiva.sathyseelan.chy21@iitbhu.ac.in>
2024-09-05 10:33:37 +00:00
Vishal Choudhary
86b8a6d0f3
feat: show violations and mutations as warning ( #10214 )
...
* feat: add audit warning to policy spec
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: emit warning when audit warning is set
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add audit warn to policy cache
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add warnings for validation
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add warnings for mutation
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add chainsaw test
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add more chainsaw test
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* chore: fix ci
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: rename field to emit warning
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: unit tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: validate tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: cleanup
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: remove validation action failure fro mutation unit tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-09-05 10:02:00 +00:00
Vishal Choudhary
903ece34bf
feat: add support for signature algorithm in cosign cert and kms verification ( #10086 )
...
* feat: add support for signature algorithm in cosign cert and kms verification
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add signature algo at attestor level
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-05 06:57:44 +00:00
D N Siva Sathyaseelan
cc966bf7af
feat:support default value into apiCall context variables ( #10594 )
...
* initial changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* test changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* logical changes
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* added Check for default in transformAndStore
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* codegen applied
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* considered an edge case
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
* fix: remove error when jsondata and default is nil
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* codegen done
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
---------
Signed-off-by: sivasathyaseeelan <dnsiva.sathyaseelan.chy21@iitbhu.ac.in>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-05 13:57:44 +08:00
Ammar Yasser
b78c501b1b
test: Uncomment tests for the policy validation feature and modify signatures ( #10784 )
...
* test: Uncomment tests for the policy validation feature and modify signatures
Update the tests to call the method in the right convention it currently uses.
And removing dependency on the github.com/kyverno/kyverno/pkg/openapi package which is no longer
required for calling Validate.
As well as updating the expected errors for the Test_ValidateJSON6902.
Signed-off-by: aerosouund <aerosound161@gmail.com>
* fix: Configure Test_ValidateNamespace to use ValidationFailureActionOverrides as an argument instead of the whole policy spec
Signed-off-by: aerosouund <aerosound161@gmail.com>
* refactor: Use newest method signatures with Validate by passing two empty usernames
Signed-off-by: aerosouund <aerosound161@gmail.com>
* test: Use stretchr testify and bring the test that was written in main to the suite
Signed-off-by: aerosouund <aerosound161@gmail.com>
---------
Signed-off-by: aerosouund <aerosound161@gmail.com>
Signed-off-by: Ammar Yasser <aerosound161@gmail.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-09-04 21:38:03 +00:00
Liang Deng
cac7b21225
fix: concurrent map read and map write when applying a validate.podSecurity rule ( #11012 )
...
Signed-off-by: Liang Deng <283304489@qq.com>
2024-09-04 17:05:10 +00:00
shuting
01cc42e78a
fix: add auth check to the admission controller for generate policies ( #10963 )
...
* fix: add auth check to the admission controller for generate policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: enable auth check if sync=true
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: restict to list/get permissions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: aggregate clusterrole to admission controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: aggregate clusterrole to admission controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: aggregate clusterrole to admission controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: aggregate clusterrole to admission controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-09-04 11:26:24 +00:00
Vishal Choudhary
c0d6eaddb3
feat: delete webhook configurations after kyverno is uninstalled ( #10782 )
...
* feat: delete webhook configurations after kyverno is uninstalled
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: optionally add permissions
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: linter
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: disable finalizers in latest manifest
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: move webhook cleanup to webhooks controller
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add finalizers on deployment
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: refactor
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add roles to cleanupcontroller
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add cleanup to generic controllers
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add webhook cleanup in generic controllers
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: remove unnecessary clusterrole and clusterrole bindings
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: make this behaviour opt-in
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: reconcile webhook setup on deployment change
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: update codegen and remove unused vars
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* feat: add finalizers to chart
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-09-04 10:59:59 +00:00
Pradeep Lakshmi Narasimha
416b7d2f8b
fix: Honour generateSuccessEvents config for generating success events ( #9870 ) ( #10741 )
...
Signed-off-by: Pradeep Lakshmi Narasimha <pradeep.vaishnav4@gmail.com>
2024-09-04 10:25:34 +00:00
Alex Hamlin
218877dc03
Evaluate one version of each pod security standard ( #10924 )
...
The original logic for evaluating pod security standards took two steps
for each defined check:
1. If the policy author requested the latest version of the standard,
find the newest version of the check and evaluate the pod against it,
adding any failure to the final results.
2. Otherwise, evaluate the pod against *each version of the check* whose
minimum version is below the requested version, adding any failures
to the final results.
This second step can be problematic, as new PSS versions may permit a
broader range of values for a restricted field compared to old versions.
As a concrete example, versioned podSecurity rules don't permit some of
the newer sysctls allowed by Kubernetes v1.27 and v1.29, since Kyverno
still evaluates v1.0 of the check.
With this change, Kyverno identifies the highest version of the check
that the podSecurity rule allows, and only executes that version of the
check against the pod. Since the "latest" version is special-cased to
compare newer than all non-latest versions, no special logic is required
in that case.
I've added unit tests for several combinations of sysctl and policy
version, especially to check that policy v1.27 permits the new sysctl
allowed in v1.27 but not the sysctls allowed in v1.29. I've also taken
the liberty of changing `assert.Assert` to `assert.Check`, to collect
multiple failures from a single unit test run.
Signed-off-by: Alex Hamlin <alexanderh@qualtrics.com>
2024-09-03 18:58:40 +00:00
Vishal Choudhary
95f54a1cb6
feat: enable custom data in policy reports using properties ( #10933 )
...
* feat: enable custom data in policy reports using properties
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: dont throw error in variable substitution for properties
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-09-03 17:36:07 +00:00
Rizul Gupta
02ffe4131c
add image name in all logs ( #10837 )
...
* add image name in all logs
Signed-off-by: Rizul Gupta <mail2rizul@gmail.com>
* make lint tests pass
Signed-off-by: Rizul Gupta <mail2rizul@gmail.com>
---------
Signed-off-by: Rizul Gupta <mail2rizul@gmail.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-30 09:22:44 +00:00
Anushka Mittal
b76bb77e46
Deferred loading for image info in policy context ( #10787 )
...
* fix: add deferred loading for image info in policy context
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: move logic to context.go
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: add unit test
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: cleanup code
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: unit test
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* fix: unit test
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
---------
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
Co-authored-by: anushkamittal20 <anumittal4641@gmail.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-30 05:35:26 +00:00
asr2003
8f418a90fc
fix: variable substitution error handling in policy validation ( #10936 )
...
* fix variable substitution error handling in policy validation and add tests
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* cleanup
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* fix variable substitution error handling in policy validation and add tests
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* cleanup
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* add review comment
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com>
* Update pkg/validation/policy/validate.go
The rule and policy will be appended to the top level message, so no need to repeat here.
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fmt
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
* Update pkg/validation/policy/validate.go
update for unit tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Ambati Sahithi <162500856+asr2003@users.noreply.github.com>
Signed-off-by: asr2003 <162500856+asr2003@users.noreply.github.com>
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-29 23:49:45 +00:00
Mariam Fahmy
bde90340a6
chore: remove v1alpha1 of VAPs and use v1beta1 ( #10955 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-29 15:31:25 +00:00
Mariam Fahmy
e00596a551
fix: match wildcard names for generateExisting policies ( #10945 )
...
* fix: match wildcard names for generateExisting policies
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* chore: add unit tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-29 13:09:30 +00:00
shuting
2cd462570a
feat: foreach
support for clone
( #10888 )
...
* chore: add chainsaw tests for foreach clone
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: update webhooks for foreach generate
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: rename generatePattern
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: chainsaw tests for generateExisting
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: add missing files
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: add chainsaw tests for foreach clone, sync=true
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: linter issues
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: add chainsaw test foreach clonelist, sync=true, delete source
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: sync deletion for cloneList
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-08-29 11:59:22 +00:00
Charles-Edouard Brétéché
f87fa52cb7
feat: bump to k8s 1.31 ( #10938 )
...
* feat: bump to k8s 1.31
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* tidy
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* mod
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix otel
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix otel schema
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* update linter
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* feat: fix image verification tests
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* linter issues
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* cel change
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-08-28 17:09:58 +00:00
Mariam Fahmy
2140a0239b
chore: rename validationFailureAction to failureAction under the rule ( #10893 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-27 20:07:57 +00:00
Khaled Emara
aceb7d5068
feat(gctx): retry logic ( #10796 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-08-21 19:32:58 +00:00
Vishal Choudhary
4287f8cc29
feat: regexp support for sigstore bundle ( #10901 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-08-21 15:34:04 +00:00
Jim Bugwadia
f06399200c
remove wildcard permissions ( #10785 )
...
* remove wildcard permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* codegen
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix background controller perms
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* remove secrets perm
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update tests
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix reports-controller role
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* add wildcard check and limit generate policy checks based on `synchronize`
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update manifest
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix wildcard check
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* update default QPS and burst for better performance and to prevent test failure
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix perms
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix perms
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix test permissions
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix merge issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* fix merge issues
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-20 11:55:32 +03:00
Vishal Choudhary
0c2a88638b
fix: properly use useCache field in image verification policies ( #10709 )
...
* fix: properly use useCache field in image verification policies
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add test
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: revert client changes
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-19 14:26:07 +00:00
shuting
bd71af3291
feat: support foreach
for generate.data
( #10875 )
...
* chore: refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: add foreach for generate.daya to api
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: refactor generator
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: linter
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update rule validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update rule validation -2
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: support foreach.data
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: policy validation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: context variables
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: add a chainsaw test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: sync on policy deletion
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: enable new chainsaw tests in CI
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update code-gen
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: validate targets scope for ns-policies
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: add missing files
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: remove unreasonable test
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update install.yaml
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-08-19 06:55:19 +00:00
Jim Bugwadia
c96f224e8e
reduce recursions for nested var substutution ( #10877 )
...
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2024-08-18 17:40:27 +08:00
Khaled Emara
a5915a310b
chore(log): add caller ( #10874 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-08-16 14:08:55 +00:00
Vishal Choudhary
06ffd1c961
feat: add support for sigstore bundle verification ( #10567 )
...
* feat: add support for sigstore bundle verification
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: missed change
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: ci
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: linter
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: another linter
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
* fix: add size check in layer
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
---------
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-08-16 11:36:48 +00:00
Vishal Choudhary
f69ffe12ec
feat: add full regexp support to cosign ( #10815 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-08-16 07:03:59 +00:00
Jim Bugwadia
3c63152f18
update message ( #10862 )
...
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2024-08-15 14:42:29 +00:00
Khaled Emara
40ba712987
fix(log): set zerolog level to logr level ( #10867 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-15 13:49:50 +00:00
Jim Bugwadia
2e39e27102
rename package: d4f --> breaker ( #10863 )
...
* rename package: d4f --> breaker
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
* rename package: d4f --> breaker
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
---------
Signed-off-by: Jim Bugwadia <jim@nirmata.com>
2024-08-15 10:53:20 +00:00
shuting
5203809b73
chore: refactor background controller ( #10850 )
...
* chore: refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: add foreach for generate.daya to api
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: refactor
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-08-14 14:32:49 +00:00
shuting
481798c836
refactor: update updaterequest to be created for each policy ( #10793 )
...
* chore: remove v1beta1 updaterequest definitions
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update UR to map a policy instead a rule; adapt UR mapping changes for admission review
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update code-gen
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: linter
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: remove unused function
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: add missing files
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: add missing files
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update ur in policy controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update crds
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: adapt ur changes in the background controller
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: linter
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: more linter
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: modify mapping relationship for deletion events
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: remedy missing target for policy application
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: fetching logic for triggers
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: clean up targets upon policy deletion
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update crds
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* merge main
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* merge main
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: adds delay before assertion
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* chore: update docs
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: wrong yaml format
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* feat: update error handling logic
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix(attempt): enable more debug info
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix(attempt): enable debug log
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix(attempt): enable debug log
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix(attempt): enable debug log
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: makefile to update ur crds
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: generate existing
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: skip empty ur generation
Signed-off-by: ShutingZhao <shuting@nirmata.com>
* fix: update install.yaml
Signed-off-by: ShutingZhao <shuting@nirmata.com>
---------
Signed-off-by: ShutingZhao <shuting@nirmata.com>
2024-08-13 17:14:06 +00:00
Khaled Emara
de37a045be
feat(logger): replace zap with zerlog for perf ( #10790 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-13 15:12:21 +00:00
Mariam Fahmy
25b7142ee0
feat: generate VAPs from exceptions ( #10771 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-13 11:55:22 +00:00
Mariam Fahmy
3a69702b49
fix: check permissions for validate.cel subrules only ( #10829 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-08-13 12:25:29 +03:00
Khaled Emara
bbb1d6103c
feat(mutate): don't eagerly process img-ver ( #10703 )
...
* feat(mutate): don't eagerly process img-ver
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(mutate): add mutate with img-ver test
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-08-12 14:59:27 +00:00
Khaled Emara
65a43d2059
feat(mutate): minimize unmarshals ( #10702 )
...
* feat(mutate): minimize unmarshals
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(mutate): test type assertion
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(codegen): remove unused import
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-08-09 11:12:20 +00:00
Mariam Fahmy
60a8384fd4
feat: add tests for different values of generateExisting ( #10807 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-08 12:11:20 +00:00
Mariam Fahmy
c7122edfa8
feat: add tests for different values of mutateExistingOnPolicyUpdate ( #10797 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-07 15:06:01 +00:00
Mariam Fahmy
53e0ccdc25
fix: pass resource names to auth check for mutateExisting policies ( #10808 )
2024-08-07 14:09:16 +00:00
Mariam Fahmy
4d1f040e49
fix: add the resource name to the SubjectAccessReview ( #10221 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-08-07 12:46:44 +00:00
Mariam Fahmy
c796bb765c
fix: return policies with either audit or enforce rules from the cache ( #10667 )
...
* fix: return policies with either audit or enforce rules from the cache
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: introduce validationFailureAction under verifyImage rules
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* feat: add chainsaw tests
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-08-06 18:24:28 +00:00
Frank Jogeleit
deab83d62f
reconcile only PolicyReports managed by kyverno ( #10794 )
...
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
Co-authored-by: shuting <shuting@nirmata.com>
2024-08-06 12:43:47 +00:00
Khaled Emara
c0cf6c5bf1
feat(json): unmarshal at decode time ( #10700 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-05 15:46:50 +03:00
Frank Jogeleit
91ffbb6758
feat: assert rule autogen ( #10780 )
...
* Support autogen for assert validation rules
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
* simplify assert autogen logic
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
* add chainsaw test
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
---------
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
2024-08-05 10:59:55 +00:00
Mariam Fahmy
ce7e570268
fix: set all operations by default in the generated VAP ( #10100 )
...
* fix: set all operations by default in the generated VAP
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix chainsaw test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-02 14:12:42 +00:00
Mariam Fahmy
9d28116eb4
fix: allow exceptions to match Pod/ephemeralcontainers by default ( #10778 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-08-02 12:47:09 +00:00
Charles-Edouard Brétéché
a1510d9db1
feat: add more policy validation around policies using kyverno-json ( #10777 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-08-02 14:47:03 +03:00
Charles-Edouard Brétéché
fc694bc24c
feat: add kyverno json support to validation rule ( #10763 )
...
* feat: add kyverno json support to validation rule
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* v2beta1
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* validation
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* engine handler
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* bindings
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* context functions
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* better bindings
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-08-02 08:24:30 +00:00
Khaled Emara
d173752041
feat(json): unmarshal once per policy ( #10701 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-30 10:52:41 +00:00
Khaled Emara
0aeb32df3b
feat(autogen): use static bytes instead of string ( #10723 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-29 13:46:11 +00:00
Khaled Emara
c2646f7a9d
feat(json): reduce reliance on DocumentToUntyped()
( #10724 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-29 11:57:20 +00:00
Ammar Yasser
f618717f75
fix: Check for the client being nil before applying a mutation ( #10726 )
...
Signed-off-by: aerosouund <aerosound161@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-26 10:49:51 +00:00
Mariam Fahmy
716611b7ea
fix: return all the exceptions that match the incoming resource ( #10722 )
...
* fix: return all the exceptions that match the incoming resource
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: modify log messages
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-25 17:36:19 +00:00
Korada Vishal
ca17cb2c6f
Improved test covergae for forceMutate ( #10103 )
...
Signed-off-by: Vishal K <korada.vishal.phe22@itbhu.ac.in>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-24 10:43:07 +00:00
Mariam Fahmy
b0cef72df1
feat: support exclude block in generating VAPs ( #10215 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-16 18:06:58 +03:00
Mariam Fahmy
35494bd8bb
feat add chainsaw tests for pod security and exceptions ( #10664 )
...
* feat add chainsaw tests for pod security and exceptions
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* fix: enable ProcMountType in the kind config
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-16 12:14:47 +00:00
Mariam Fahmy
5b715420a3
fix: truncate event messages to 1024 chars ( #10636 )
...
* fix: truncate event messages to 1024 chars
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
* add chainsaw test
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
---------
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Jim Bugwadia <jim@nirmata.com>
2024-07-10 14:31:32 +00:00
Vishal Choudhary
9904718d08
fix: rename level 1 logs to INFO from DEBUG ( #10617 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-10 12:31:19 +00:00
Anushka Mittal
429b05544a
fix: compute operations for mutatingwebhookconf ( #10639 )
...
* fix: compute operations for mutatingwebhookconf
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
* chore: add unit test
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
---------
Signed-off-by: anushkamittal20 <anumittal4641@gmail.com>
Co-authored-by: anushkamittal20 <anumittal4641@gmail.com>
2024-07-10 10:02:04 +00:00
Khaled Emara
aafc4fe97e
fix(json-ctx): overwrite element each iteration ( #10615 )
...
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
2024-07-05 15:06:48 +00:00
Mariam Fahmy
ad6ee93e3b
fix: CEL policies aren't applied to deleted resources ( #10611 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 22:16:36 +05:30
Charles-Edouard Brétéché
1647675190
feat: improve api json parsing ( #10600 )
...
* feat: improve api json parsing
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* fix
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 16:05:42 +02:00
Khaled Emara
c2a9e9ef69
feat(events): normalize gctx events reason to be inline with other po… ( #10395 )
...
* feat(events): normalize gctx events reason to be inline with other policies
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* chore(events): hide queue limit messages at a higher level
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
* test(gctx): add factory test
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
---------
Signed-off-by: Khaled Emara <khaled.emara@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-04 16:12:48 +03:00
Mariam Fahmy
a46f1eb48c
fix: failed to delete resource ( #10582 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-07-02 19:54:27 +00:00
Mariam Fahmy
f738b027c3
fix: cleanup policy name is appended to logs ( #10583 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-02 16:32:51 +00:00
Vishal Choudhary
d57edc8530
feat: fix notary tests ( #10579 )
...
Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
2024-07-02 14:18:29 +00:00
Yukun Wang
8890fffafb
fix: include error message when policy context creation failed ( #10566 )
...
* fix: include error message when policy context creation failed
Signed-off-by: airycanon <airycanon@airycanon.me>
* Update pkg/webhooks/resource/validation/validation.go
Co-authored-by: shuting <shuting@nirmata.com>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>
---------
Signed-off-by: airycanon <airycanon@airycanon.me>
Signed-off-by: Yukun Wang <airycanon@airycanon.me>
Co-authored-by: shuting <shuting@nirmata.com>
2024-07-01 13:29:11 +00:00
Mariam Fahmy
68df5af40e
fix rule type for mutate and generate rules ( #10554 )
...
Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
2024-06-28 16:40:56 +00:00
Husni Alhamdani
52ec560ffb
move mutate existing rule skipped log to v4 ( #10560 )
...
Signed-off-by: Husni Alhamdani <dhanielluis@gmail.com>
2024-06-28 12:08:46 +08:00
Charles-Edouard Brétéché
1a02b70a1c
feat: make any struct common to all api versions ( #10553 )
...
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-27 10:09:57 +00:00
Charles-Edouard Brétéché
6f4818d724
feat: rework conditions marshaling ( #10550 )
...
* feat: rework conditions marshaling
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* codegen
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
* tests
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
---------
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
2024-06-27 10:00:02 +03:00