Skip to content

Commit

Permalink
PAPP-34892 update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mnordby-splunk committed Oct 21, 2024
1 parent 3406a25 commit 8fed727
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 141 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.16
rev: v1.23
hooks:
- id: org-hook
- id: package-app-dependencies
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
rev: v1.5.0
hooks:
- id: detect-secrets
args: ['--no-verify', '--exclude-files', '^awswafv2.json$']
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
14 changes: 1 addition & 13 deletions awswafv2.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"utctime_updated": "2022-01-07T20:07:08.000000Z",
"package_name": "phantom_awswafv2",
"main_module": "awswafv2_connector.py",
"min_phantom_version": "6.1.1",
"min_phantom_version": "6.2.2",
"fips_compliant": true,
"app_wizard_version": "1.0.0",
"python_version": "3",
Expand Down Expand Up @@ -918,21 +918,9 @@
"module": "jmespath",
"input_file": "wheels/shared/jmespath-0.10.0-py2.py3-none-any.whl"
},
{
"module": "python_dateutil",
"input_file": "wheels/shared/python_dateutil-2.8.2-py2.py3-none-any.whl"
},
{
"module": "s3transfer",
"input_file": "wheels/shared/s3transfer-0.3.7-py2.py3-none-any.whl"
},
{
"module": "six",
"input_file": "wheels/shared/six-1.16.0-py2.py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.18-py2.py3-none-any.whl"
}
]
}
Expand Down
188 changes: 93 additions & 95 deletions awswafv2_connector.py

Large diffs are not rendered by default.

53 changes: 27 additions & 26 deletions awswafv2_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,36 @@
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific language governing permissions
# and limitations under the License.
AWSWAF_VERSION_V2 = 'wafv2'
AWSWAF_ACCESS_KEY = 'access_key_id'
AWSWAF_SECRET_KEY = 'access_key_secret' # pragma: allowlist secret
AWSWAF_REGION = 'region'
AWSWAF_SCOPE = 'scope'
AWSWAF_SCOPE_CLOUDFRONT = 'CLOUDFRONT'
AWSWAF_ADD_IP = 'add_ip'
AWSWAF_DELETE_IP = 'delete_ip'
AWSWAF_VERSION_V2 = "wafv2"
AWSWAF_ACCESS_KEY = "access_key_id"
AWSWAF_SECRET_KEY = "access_key_secret" # pragma: allowlist secret
AWSWAF_REGION = "region"
AWSWAF_SCOPE = "scope"
AWSWAF_SCOPE_CLOUDFRONT = "CLOUDFRONT"
AWSWAF_ADD_IP = "add_ip"
AWSWAF_DELETE_IP = "delete_ip"
AWSWAF_DEFAULT_LIMIT = 100
AWSWAF_INSUFFICIENT_PARAM = 'Insufficient parameters. Please provide either ip_set_name or ip_set_id'
AWSWAF_ERR_TOKEN = 'Error in connection while getting the token'
AWSWAF_ERR_CREATE_IPSET = 'Error in connection while creating a new IP set'
AWSWAF_ERR_GET_IPSET = 'Error in connection while getting an IP set'
AWSWAF_ERR_UPDATE_IPSET = 'Error in connection while updating an IP set'
AWSWAF_INSUFFICIENT_PARAM = "Insufficient parameters. Please provide either ip_set_name or ip_set_id"
AWSWAF_ERR_TOKEN = "Error in connection while getting the token"
AWSWAF_ERR_CREATE_IPSET = "Error in connection while creating a new IP set"
AWSWAF_ERR_GET_IPSET = "Error in connection while getting an IP set"
AWSWAF_ERR_UPDATE_IPSET = "Error in connection while updating an IP set"
AWSWAF_ERR_LIST_WEBACLS = "Error while connecting list_web_acls api"
AWSWAF_ERR_LIST_IPSET = "Error while connecting list_ip_sets api"
AWSWAF_ERR_IP_NOT_FOUND = "IP could not be found in the given ip set. Please provide valid input parameters"
AWSWAF_INVALID_INPUT = 'The given input ip_set_id/ip_set_name is not valid. Please provide valid input parameters'
AWSWAF_INVALID_IP = 'Please enter IP in a proper format which includes the mask of the IP (e.g. 126.0.0.0/24 or ' \
'1111:0000:0000:0000:0000:0000:0000:0115/128)'
AWSWAF_INVALID_LIMIT = 'Please provide a non-zero positive integer in limit'
AWSWAF_TEST_CONNECTIVITY_FAILED = 'Test Connectivity Failed'
AWSWAF_TEST_CONNECTIVITY_PASSED = 'Test Connectivity Passed'
AWSWAF_ADD_IP_SUCCESS = 'IP(s) added successfully'
AWSWAF_ADD_IP_FAILED = 'IP could not be added'
AWSWAF_DELETE_IP_FAILED = 'IP could not be deleted'
AWSWAF_DELETE_IP_SUCCESS = 'IP(s) deleted successfully'
AWSWAF_DELETE_IPSET_FAILED = 'IP Set could not be deleted'
AWSWAF_DELETE_IPSET_SUCCESS = 'IP Set deleted successfully'
AWSWAF_INVALID_INPUT = "The given input ip_set_id/ip_set_name is not valid. Please provide valid input parameters"
AWSWAF_INVALID_IP = (
"Please enter IP in a proper format which includes the mask of the IP (e.g. 126.0.0.0/24 or " "1111:0000:0000:0000:0000:0000:0000:0115/128)"
)
AWSWAF_INVALID_LIMIT = "Please provide a non-zero positive integer in limit"
AWSWAF_TEST_CONNECTIVITY_FAILED = "Test Connectivity Failed"
AWSWAF_TEST_CONNECTIVITY_PASSED = "Test Connectivity Passed"
AWSWAF_ADD_IP_SUCCESS = "IP(s) added successfully"
AWSWAF_ADD_IP_FAILED = "IP could not be added"
AWSWAF_DELETE_IP_FAILED = "IP could not be deleted"
AWSWAF_DELETE_IP_SUCCESS = "IP(s) deleted successfully"
AWSWAF_DELETE_IPSET_FAILED = "IP Set could not be deleted"
AWSWAF_DELETE_IPSET_SUCCESS = "IP Set deleted successfully"
AWSWAF_BAD_ASSET_CFG_ERR_MSG = "Please provide access keys or select assume role check box in asset configuration"
AWSWAF_INFO_CHECK_CREDENTIALS = "Querying AWS to check credentials"
AWSWAF_INFO_SCOPE = "To work with CloudFront scope, you must specify the Region US East (N. Virginia)"
Expand All @@ -65,5 +66,5 @@
"EU (Stockholm)": "eu-north-1",
"South America (Sao Paulo)": "sa-east-1",
"AWS GovCloud (US-East)": "us-gov-east-1",
"AWS GovCloud (US)": "us-gov-west-1"
"AWS GovCloud (US)": "us-gov-west-1",
}
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
[flake8]
max-line-length = 145
max-complexity = 28
extend-ignore = F403,E128,E126,E111,E121,E127,E731,E201,E202,F405,E722,D,W292

[isort]
line_length = 145
extend-ignore = F403,E128,E126,E121,E127,E731,E201,E202,E203,E701,F405,E722,D,W503
Binary file not shown.
Binary file removed wheels/shared/six-1.16.0-py2.py3-none-any.whl
Binary file not shown.
Binary file removed wheels/shared/urllib3-1.26.18-py2.py3-none-any.whl
Binary file not shown.

0 comments on commit 8fed727

Please sign in to comment.