Skip to content
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
15 changes: 10 additions & 5 deletions .github/workflows/socket-basics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ on:

jobs:
socket-basics-security-scan:
# We intentionally run this shared action from @main, not from a pinned sha
# this is because we control the shared-actions repo, so there is not a significant risk of malicious changes being pushed.
# Plus, the shared action does use pinned dependencies, and so will be updated fairly often. When we do that, we do not
# want to have to update the sha in every repo that uses this shared action, before such updates apply.
uses: ynab/shared-actions/.github/workflows/socket-basics.yml@main
# TESTING ONLY — both refs below point at unmerged branches, to canary the
# ynab-sast-scanner migration before it reaches main. Before this merges, and before
# this repo is actually migrated, these become:
# uses: ynab/ynab-sast-scanner/.github/workflows/socket-basics.yml@main
# and the `with:` block goes away entirely, so suppressions come from the
# suppressions repo's default branch.
uses: ynab/ynab-sast-scanner/.github/workflows/socket-basics.yml@add-sast-scanner-infrastructure
with:
suppressions-ref: add-sast-scanner-infrastructure
secrets:
SOCKET_SECURITY_API_KEY: ${{ secrets.SOCKET_SECURITY_API_KEY }}
SAST_SUPPRESSIONS_APP_PRIVATE_KEY: ${{ secrets.SAST_SUPPRESSIONS_APP_PRIVATE_KEY }}
8 changes: 8 additions & 0 deletions sast-canary/canary.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Deliberate SAST canary fixture for testing the ynab-sast-scanner migration end to end.
# Not real code path — exercises TLS verification being disabled on an outbound request,
# a genuine, unsuppressed finding, to confirm the new workflow actually blocks a PR.
import requests


def fetch_user_avatar(user_supplied_url):
return requests.get(user_supplied_url, verify=False)
Loading