Skip to content

Commit

Permalink
nexus7
Browse files Browse the repository at this point in the history
  • Loading branch information
garland committed Aug 18, 2024
1 parent d1c4ff7 commit 940075e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nexus-trusted-traveler-scheduler-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: "nexus 1"
on:
# Push is for testing only to allow you to test this workflow without
# a merge and just a push.
# push:
push:
# pull_request:
# types:
# - closed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,25 @@ def send_notification(self, body: str, level: int = 1) -> None:

title = "Trusted Traveler Scheduler"

apobj = apprise.Apprise(self.notification_urls)
result = apobj.notify(title=title, body=body, body_format=apprise.NotifyFormat.TEXT)

# If you encounter Apprise errors, https://github.com/caronc/apprise/wiki/Development_LogCapture
# may be useful.
if result is None:
print('{datetime.today():%Y/%m/%d %H:%M:%S}: error: No notifications sent (configuration error)')
elif result is False:
print('{datetime.today():%Y/%m/%d %H:%M:%S}: error: At least 1 notification failed to send')
pattern = r"Sun|Fri|Sat"
match = re.search(pattern, body)
print("GarDebug: in sending notification")

if match:
print(f"GarDebug: Sending notification: {body}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This expression logs
sensitive data (private)
as clear text.
This expression logs
sensitive data (private)
as clear text.

apobj = apprise.Apprise(self.notification_urls)
result = apobj.notify(title=title, body=body, body_format=apprise.NotifyFormat.TEXT)

# If you encounter Apprise errors, https://github.com/caronc/apprise/wiki/Development_LogCapture
# may be useful.
if result is None:
print('{datetime.today():%Y/%m/%d %H:%M:%S}: error: No notifications sent (configuration error)')
elif result is False:
print('{datetime.today():%Y/%m/%d %H:%M:%S}: error: At least 1 notification failed to send')

else:
print(f"GarDebug: Skipping notification: {body}")

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This expression logs
sensitive data (private)
as clear text.
This expression logs
sensitive data (private)
as clear text.

def new_appointment(self, location_id: int, appointments: List[Schedule]) -> None:
"""
Expand Down

0 comments on commit 940075e

Please sign in to comment.