Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial migration work #1

Merged
merged 13 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[run]
source = parliament
omit = parliament/cli.py
source = parliamentarian
omit = parliamentarian/cli.py

[report]
fail_under = 75
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
colton-herrod-bayer marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ on:

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
pull_request:
branches:
- main

jobs:
test:
colton-herrod-bayer marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make setup
- name: Run test
run: |
make test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ venv/
htmlcov/
dist/
.env/
parliament/private_auditors
parliamentarian/private_auditors
tmp/*
.idea/*
.vscode
2 changes: 1 addition & 1 deletion bin/parliament
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ from pathlib import Path
path = Path(os.path.abspath(__file__))
sys.path.append(str(path.parent.parent))

from parliament.cli import main
from parliamentarian.cli import main
main()
File renamed without changes.
4 changes: 2 additions & 2 deletions parliament/cli.py → parliamentarian/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
from os.path import join
from pathlib import Path

from parliament import (
from parliamentarian import (
analyze_policy_string,
enhance_finding,
override_config,
config,
__version__,
)
from parliament.misc import make_list
from parliamentarian.misc import make_list

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import jsoncfg

from parliament import Policy
from parliamentarian import Policy


def get_stmts(policy: Policy) -> Iterable:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from collections import defaultdict

from parliament import is_arn_match, expand_action
from parliamentarian import is_arn_match, expand_action


def _expand_action(operation):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_single-vs-multi-valued-condition-keys.html
"""
import re
from parliament import Policy
from parliament.misc import make_list
from parliamentarian import Policy
from parliamentarian.misc import make_list


def audit(policy: Policy) -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string

S3_STAR_FINDINGS = {"PERMISSIONS_MANAGEMENT_ACTIONS", "RESOURCE_MISMATCH"}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string


class TestCredentialsManagement:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string


class TestPermissionsManagement:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string


class TestPrivilegeEscalation:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string


class TestSensitiveAccess:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from parliament import analyze_policy_string
from parliamentarian import analyze_policy_string


class TestSensitiveAccess:
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading