8000 Component Governance python security updates (#1936) · cybsafe/botbuilder-python@d18e955 · GitHub
[go: up one dir, main page]

Skip to content

Commit d18e955

Browse files
author
BruceHaley
authored
Component Governance python security updates (microsoft#1936)
* Fix django vulnerability * vulnerability fix: "django==2.2.28" * Update botbuilder requirements to 4.14.2 * Fix black import error * reformat libraries with latest black * Add component detection * Update urllib3 root dependencies * Revert azure-cognitiveservices-language-luis to 0.2.0 from 0.7.0 * Roll back all urllib3 root dependencies * Revert the last two * git reset to 'Add component detection' commit * git reset to 'Update urllib3 root dependencies' commit * Revert azure-cognitiveservices-language-luis to 0.2.0
1 parent 92bd482 commit d18e955

File tree

108 files changed

+619
-298
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+619
-298
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
botbuilder-integration-aiohttp>=4.14.0
2-
botbuilder-dialogs>=4.14.0
3-
botbuilder-ai>=4.14.0
1+
botbuilder-integration-aiohttp>=4.14.2
2+
botbuilder-dialogs>=4.14.2
3+
botbuilder-ai>=4.14.2
44
datatypes-date-time>=1.0.0.a2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
botbuilder-integration-aiohttp>=4.14.0
1+
botbuilder-integration-aiohttp>=4.14.2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
botbuilder-integration-aiohttp>=4.14.0
1+
botbuilder-integration-aiohttp>=4.14.2

libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_adapter.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ async def update_activity(self, context: TurnContext, activity: Activity):
103103

104104
message = SlackHelper.activity_to_slack(activity)
105105
results = await self.slack_client.chat_update(
106-
ts=message.ts, channel=message.channel, text=message.text,
106+
ts=message.ts,
107+
channel=message.channel,
108+
text=message.text,
107109
)
108110

109111
if results.status_code / 100 != 2:

libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,9 @@ async def post_message(self, message: SlackMessage) -> SlackResponse:
409409
if message.blocks:
410410
request_content["blocks"] = json.dumps(message.blocks)
411411

412-
session = aiohttp.ClientSession(timeout=aiohttp.ClientTimeout(total=30),)
412+
session = aiohttp.ClientSession(
413+
timeout=aiohttp.ClientTimeout(total=30),
414+
)
413415

414416
http_verb = "POST"
415417
api_url = POST_EPHEMERAL_MESSAGE_URL if message.ephemeral else POST_MESSAGE_URL

libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def activity_to_slack(activity: Activity) -> SlackMessage:
5656
message.blocks = att.content
5757
else:
5858
new_attachment = Attachment(
59-
author_name=att.name, thumb_url=att.thumbnail_url, text="",
59+
author_name=att.name,
60+
thumb_url=att.thumbnail_url,
61+
text="",
6062
)
6163
attachments.append(new_attachment)
6264

libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ async def _recognize_internal(
262262
if turn_context.activity.type != ActivityTypes.message:
263263
return None
264264

265-
utterance: str = turn_context.activity.text if turn_context.activity is not None else None
265+
utterance: str = (
266+
turn_context.activity.text if turn_context.activity is not None else None
267+
)
266268
recognizer_result: RecognizerResult = None
267269

268270
if luis_prediction_options:

libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_v2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def __init__(
4444

4545
async def recognizer_internal(self, turn_context: TurnContext):
4646

47-
utterance: str = turn_context.activity.text if turn_context.activity is not None else None
47+
utterance: str = (
48+
turn_context.activity.text if turn_context.activity is not None else None
49+
)
4850
luis_result: LuisResult = self._runtime.prediction.resolve(
4951
self._application.application_id,
5052
utterance,

libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_v3.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ def __init__(
5555
async def recognizer_internal(self, turn_context: TurnContext):
5656
recognizer_result: RecognizerResult = None
5757

58-
utterance: str = turn_context.activity.text if turn_context.activity is not None else None
58+
utterance: str = (
59+
turn_context.activity.text if turn_context.activity is not None else None
60+
)
5961

6062
url = self._build_url()
6163
body = self._build_request(utterance)

libraries/botbuilder-ai/botbuilder/ai/luis/luis_util.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,14 @@ def recognizer_result_as_dict(
303303
) -> Dict[str, object]:
304304
# an internal method that returns a dict for json serialization.
305305

306-
intents: Dict[str, Dict[str, float]] = {
307-
name: LuisUtil.intent_score_as_dict(intent_score)
308-
for name, intent_score in recognizer_result.intents.items()
309-
} if recognizer_result.intents is not None else None
306+
intents: Dict[str, Dict[str, float]] = (
307+
{
308+
name: LuisUtil.intent_score_as_dict(intent_score)
309+
for name, intent_score in recognizer_result.intents.items()
310+
}
311+
if recognizer_result.intents is not None
312+
else None
313+
)
310314

311315
dictionary: Dict[str, object] = {
312316
"text": recognizer_result.text,

0 commit comments

Comments
 (0)
0