-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add BC token deprecation notice and v3 migration guide
- Loading branch information
Showing
3 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
layout: default | ||
published: true | ||
title: Migration | ||
nav_order: 5 | ||
--- | ||
|
||
# Migration - v2 to v3 | ||
|
||
With v3 not only new features were added, but following behaviour changed or was completely removed. | ||
We plan to release the new version end of October 2023. | ||
|
||
## Remove of "level up" | ||
|
||
Since Bridgecrew standalone edition will be shutting down at the [end of 2023](https://www.paloaltonetworks.com/services/support/end-of-life-announcements) we removed the "level up" flow, | ||
which is triggered by just running `checkov` without any flag. | ||
|
||
## Python custom checks | ||
|
||
If you are still using the old syntax of running your custom code | ||
|
||
```python | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
from checkov.common.models.enums import CheckResult | ||
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck | ||
|
||
|
||
class Example(BaseResourceCheck): | ||
... | ||
|
||
def scan_resource_conf(self, conf: dict[str, list[Any]], entity_type: str) -> CheckResult: | ||
... | ||
``` | ||
|
||
then you can easily use the simplified syntax and still access `entity_type`, if needed | ||
|
||
```python | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
|
||
from checkov.common.models.enums import CheckResult | ||
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck | ||
|
||
|
||
class Example(BaseResourceCheck): | ||
... | ||
|
||
def scan_resource_conf(self, conf: dict[str, list[Any]]) -> CheckResult: | ||
if self.entity_type == 'aws_instance': | ||
... | ||
|
||
... | ||
``` |