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

Cognito Release Pull Request #367

Closed
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions pacu/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class PacuSession(Base, ModelUpdateMixin):
'CloudTrail',
'CloudWatch',
'CodeBuild',
'Cognito',
'Config',
'DataPipeline',
'DynamoDB',
Expand Down Expand Up @@ -115,6 +116,7 @@ class PacuSession(Base, ModelUpdateMixin):
CloudTrail = Column(JSONType, nullable=False, default=dict)
CloudWatch = Column(JSONType, nullable=False, default=dict)
CodeBuild = Column(JSONType, nullable=False, default=dict)
Cognito = Column(JSONType, nullable=False, default=dict)
Config = Column(JSONType, nullable=False, default=dict)
DataPipeline = Column(JSONType, nullable=False, default=dict)
DynamoDB = Column(JSONType, nullable=False, default=dict)
Expand Down
1,360 changes: 1,360 additions & 0 deletions pacu/modules/cognito__attack/main.py

Large diffs are not rendered by default.

498 changes: 498 additions & 0 deletions pacu/modules/cognito__enum/main.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pacu/modules/dynamodb__enum/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def fetch_dynamodb_data(client, func, key, print, **kwargs):
if isinstance(data, (dict, str)):
return data
while 'LastEvaluatedTableName' in response:
response = caller({**kwargs, **{'ExclusiveStartTableName': response['LastEvaluatedTableName']}})
response = caller(ExclusiveStartTableName=response['LastEvaluatedTableName'], **kwargs)
data.extend(response[key])
return data
except client.exceptions.ResourceNotFoundException:
Expand Down
2,506 changes: 1,384 additions & 1,122 deletions poetry.lock

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ requests = "^2.25.1"
urllib3 = "^1.26.4"
SQLAlchemy = "~1.3.0"
SQLAlchemy-Utils = "^0.37.2"
typing-extensions = "^3.7.4.3"
typing-extensions = "^4.0.0"
dsnap = "^1.0.0"
chalice = "^1.23.0"
chalice = "^1.27.3"
policyuniverse = "^1.5.0.20220613"
pycognito = "^2023.5.0"
qrcode = "^7.4.2"
jq = "^1.4.1"
pyyaml = "^6.0.1"

[tool.poetry.dev-dependencies]
flake8 = "^3.9.1"
mypy = "^0.812"
sqlalchemy-stubs = "^0.4"
pytest = "^6.2.3"
freezegun = "^1.1.0"
typing-extensions = "^3.7.4"
typing-extensions = "^4.0.0"
boto3-stubs = {extras = ["iam", "s3", "lambda"], version = "^1.17.54"}
moto = "^2.2.1"

Expand Down
436 changes: 338 additions & 98 deletions requirements.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/test_pacu_data_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def pacu_session(db: orm.session.Session):
def test_parse_data_command_returns_help(pacu: Main, active_session: PacuSession):
msg = pacu._parse_data_command(['data', 'non-existent-service'], active_session)
assert 'Service not found. Please use the service name below.' in msg
assert 'APIGateway CloudTrail CloudWatch CodeBuild Config' in msg
assert 'APIGateway CloudTrail CloudWatch CodeBuild Cognito' in msg


def test_parse_data_command_returns_no_data_found(pacu: Main, active_session: PacuSession):
Expand Down
Loading