Fix secrets baseline and type hint error.

- detect-secrets was previously bumped to 0.13 but the baseline file was
  not updated.
- mypy objects to the way the Azure Subscription type was defined. Since
  the module is encapsulated for dependency injection, we can either
  declare it as a generic or remove the type hint. I did the latter,
  since I don't know that we gain anything by the former.
This commit is contained in:
dandds 2019-11-01 15:06:30 -04:00
parent 52de1471e0
commit 87a2da68dc
2 changed files with 4 additions and 5 deletions

View File

@ -3,7 +3,7 @@
"files": "^.secrets.baseline$|^.*pgsslrootcert.yml$", "files": "^.secrets.baseline$|^.*pgsslrootcert.yml$",
"lines": null "lines": null
}, },
"generated_at": "2019-10-28T18:00:40Z", "generated_at": "2019-11-01T18:50:54Z",
"plugins_used": [ "plugins_used": [
{ {
"base64_limit": 4.5, "base64_limit": 4.5,
@ -17,6 +17,7 @@
"name": "HexHighEntropyString" "name": "HexHighEntropyString"
}, },
{ {
"keyword_exclude": null,
"name": "KeywordDetector" "name": "KeywordDetector"
}, },
{ {
@ -197,7 +198,7 @@
} }
] ]
}, },
"version": "0.12.7", "version": "0.13.0",
"word_list": { "word_list": {
"file": null, "file": null,
"hash": null "hash": null

View File

@ -472,9 +472,7 @@ class AzureCloudProvider(CloudProviderInterface):
credentials = self._get_credential_obj(root_creds) credentials = self._get_credential_obj(root_creds)
sub_client = self.sdk.subscription.SubscriptionClient(credentials) sub_client = self.sdk.subscription.SubscriptionClient(credentials)
subscription: self.sdk.subscription.models.Subscription = sub_client.subscriptions.get( subscription = sub_client.subscriptions.get(csp_environment_id)
csp_environment_id
)
managment_principal = self._get_management_service_principal() managment_principal = self._get_management_service_principal()