Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
python3Packages,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "terraform-iam-policy-validator";
|
|
version = "0.0.9";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "awslabs";
|
|
repo = "terraform-iam-policy-validator";
|
|
tag = "v${version}";
|
|
hash = "sha256-RGZqnt2t+aSNGt8Ubi2dzZE04n9Zfkw+T3Zmol/FO+I=";
|
|
};
|
|
|
|
build-system = with python3Packages; [ poetry-core ];
|
|
|
|
dependencies = with python3Packages; [
|
|
boto3
|
|
pyyaml
|
|
];
|
|
|
|
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
|
|
|
|
# Some tests require network
|
|
disabledTestPaths = [ "test/test_accessAnalyzer.py" ];
|
|
|
|
# Tests need to be run relative to a subdir
|
|
preCheck = ''
|
|
pushd iam_check
|
|
'';
|
|
postCheck = ''
|
|
popd
|
|
'';
|
|
|
|
pythonImportsCheck = [ "iam_check" ];
|
|
|
|
meta = {
|
|
description = "CLI tool that validates AWS IAM Policies in a Terraform template against AWS IAM best practices";
|
|
homepage = "https://github.com/awslabs/terraform-iam-policy-validator";
|
|
changelog = "https://github.com/awslabs/terraform-iam-policy-validator/releases/tag/v${version}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ jherland ];
|
|
mainProgram = "tf-policy-validator";
|
|
};
|
|
}
|