Policyglass

Latest version: v0.8.0

Safety actively analyzes 688792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.8.0

- `dedupe_policy_shard_subsets` now sorts input by `effective_resource` improving readability in scenarios with simple denies that deny both Action and Resource.
- Added `union` to `EffectiveCondition`
- Added `reverse` to `EffectiveCondition`
- Fixed bug causing denies with multiple ARPs to deny more than they should because `PolicyShard.difference` didn't generate shards that accounted for one of the ARPs not being met.
- Split out `_decompose_difference` into `_decompose_difference_arps_with_combined_conditions` and `_decompose_difference_arps_with_self_conditions`

0.7.0

- Added `__bool__` and `intersection` to `EffectiveCondition`
- Replaced `conditions` and `not_conditions` on `PolicyShard` with `effective_condition`
- Fixed bug with `PolicyShard.union` where it lost `not_conditions`

0.6.0

- Renamed `delineate_intersecting_shards` to `dedupe_policy_shards` to better reflect how people will use it.
- Added `explain_policy_shards` to eventually replace `explain` attribute on `PolicyShard` class entirely.
- Added `__contains__` to `EffectiveARP` classes
- Added `reverse` method to `Condition` to reverse the operator/value to reverse the effect of the condition.
- Added `EffectiveCondition` class to house `factory` method which normalisises `not_conditions` into `conditions` where possible. This may end up being a replacement for the `conditions` and `not_conditions` attributes on `PolicyShard`.
- Normlised `not_conditions` into `conditions` where possible upon instantiation of `PolicyShard`.
- `policy_shards_effect` now runs `dedupe_policy_shards` at the end to simplify the most common execution paths.

0.5.0

- Renamed `dedupe_policy_shards` to `dedupe_policy_shard_subsets` to differentiate it from `delineate_intersecting_shards`.
- Added `delineate_intersecting_shards` to reduce the size of `PolicyShard`s which have conditions whose ARPs intersect with ones without conditions.
This helps clear up [10](https://github.com/CloudWanderer-io/PolicyGlass/issues/10)
- Improved `issubset` on `PolicyShard` to recognise that a shard without conditions CANNOT be a subset of a shard with conditions.
- Added `<` and `>` to `PolicyShard`.
- Updated `difference` on `PolicyShard` so that it only adds `other`'s conditions to `self`'s not_conditions if self is allow and other is deny.
- Added documentation on how PolicyShard dedupe works
- Renamed `ConditionCollection` to `RawConditionCollection`
- Ensured that Conditions are always treated as a set not a list.
- Ensured that Condition's Operator, Key, Values are always of type ConditionOperator, ConditionKey and ConditionValue.
- Corrected bug in `CaseInsensitiveString` that caused it to generate case sensitive hashes.
- Added `dedupe_result` param to `difference` method on `PolicyShard` to allow merging of intersecting shards that are not subsets of one another.
- Added `intersection` to `PolicyShard`.
- Prevent attempting to calculate the difference between a Deny shard and an Allow shard. Other way makes sense as that's effective permission.
- Updated PolicyShard implementation to Support pydantic 1.9

0.4.7

- Fixed case insensitive `fnmatch` for resources
- Made it impossible to instantiate EffectiveARPs that have exclusions that are not proper subsets of their inclusions
- Ensured EffectiveARP's `intersection` filters out conditions from `other` that don't overlap `self` and vice versa when assembling new ARPs
- Added `Factory` method on EffectiveARP to faciltate creation of objects whose inclusions may overlap their inclusions (i.e. by returning `None`)
- Added `__lt__` and `__gt__` to EffectiveARP to represent proper subsets
-

0.4.6

- Reverse order for second pass of dedupe to prevent failing to merge things due to sort order.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.