pantry/projects/checkov.io/package.yml
Andrew ea56add719
+checkov.io (#4310)
* new file:   projects/checkov.io/package.yml
	new file:   projects/checkov.io/test.tf

* modified:   projects/checkov.io/package.yml
	modified:   projects/checkov.io/test.tf

* .

* modified:   projects/checkov.io/package.yml
	modified:   projects/checkov.io/test.tf

* let's try hardcoded version

* -Wno-int-conversion

* try github query again

* use /tags?

error makes no sense:

```
error: Uncaught (in promise) Error: http: https://api.github.com/repos/bridgecrewio/checkov/releases?per_page=100&page=1
  if (!rsp.ok) throw new Error(`http: ${url}`)
                     ^
    at GET2 (file:///opt/pkgx.sh/brewkit/v0/lib/useGitHubAPI.ts:35:22)
    at eventLoopTick (ext:core/01_core.js:178:11)
    at async getVersionsLong (file:///opt/pkgx.sh/brewkit/v0/lib/useGitHubAPI.ts:57:27)
    at async Object.getVersions (file:///opt/pkgx.sh/brewkit/v0/lib/useGitHubAPI.ts:42:34)
    at async handleAPIResponse (file:///opt/pkgx.sh/brewkit/v0/lib/usePantry.getVersions.ts:176:50)
    at async _parse (file:///opt/pkgx.sh/brewkit/v0/lib/usePantry.getVersions.ts:34:19)
    at async Object.resolve (file:///opt/pkgx.sh/brewkit/v0/lib/usePantry.ts:39:20)
    at async file:///opt/pkgx.sh/brewkit/v0/libexec/resolve.ts:15:15
```

* it's like GITHUB_TOKEN has failed...

* let's cheat a little

* parse version from pypi.org

---------

Co-authored-by: Jacob Heider <jacob@pkgx.dev>
2023-12-10 17:17:41 -05:00

23 lines
702 B
YAML

distributable:
url: https://github.com/bridgecrewio/checkov/archive/refs/tags/{{version}}.tar.gz
strip-components: 1
versions:
url: https://pypi.org/project/checkov/#history
match: /checkov\/\d+\.\d+\.\d+/
strip: /^checkov\//
dependencies:
python.org: ^3.12
build:
script:
- python-venv.sh {{prefix}}/bin/checkov
env:
linux:
# error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *'
CFLAGS: -Wno-int-conversion
provides:
- bin/checkov
test:
- checkov --version | grep {{version}}
- checkov -f test.tf > output.log
- run: |
cat output.log | grep 'Passed checks: 14, Failed checks: 0, Skipped checks: 0'