Skip to content
Merged
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
51 changes: 51 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CodeQL SAST Scan

on:
push:
branches:
- main
pull_request:
branches: [ "main" ]
schedule:
# Run a full scan every Sunday at midnight
- cron: '0 0 * * 0'
workflow_dispatch:

permissions:
security-events: write
packages: read
actions: read
contents: read

jobs:
analyze:
name: CodeQL Analysis (javascript-typescript)
runs-on: ubuntu-latest

permissions:
packages: read
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
languages: javascript-typescript
build-mode: none
queries: security-extended
config: |
paths:
- BlinkCard/src
- sample_files
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
category: /language:javascript-typescript
86 changes: 86 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Semgrep SAST Scan

on:
push:
branches:
- main
pull_request:
branches: [ "main" ]
schedule:
# Run a full scan every Monday at midnight
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
semgrep-android:
name: Semgrep Scan (Android)
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

container:
image: semgrep/semgrep:1.171.0@sha256:bdf7013b2c3634a487671158da77c554f531742326b543a9464d2adf6c433ac8

steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Run Semgrep Scan
run: >-
semgrep scan
--config p/security-audit
--config p/secrets
--config p/owasp-top-ten
--config p/kotlin
BlinkCard/android
--sarif
--output=semgrep.sarif
- name: Upload SARIF Results to GitHub Security Tab
uses: github/codeql-action/upload-sarif@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
if: always()
with:
sarif_file: semgrep.sarif
category: semgrep-android

semgrep-ios:
name: Semgrep Scan (iOS)
runs-on: ubuntu-latest

permissions:
actions: read
contents: read
security-events: write

container:
image: semgrep/semgrep:1.171.0@sha256:bdf7013b2c3634a487671158da77c554f531742326b543a9464d2adf6c433ac8

steps:
- name: Checkout Code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Run Semgrep Scan
run: >-
semgrep scan
--config p/security-audit
--config p/secrets
--config p/owasp-top-ten
--config p/swift
BlinkCard/ios
--exclude BlinkCard/ios/Frameworks
--sarif
--output=semgrep.sarif
- name: Upload SARIF Results to GitHub Security Tab
uses: github/codeql-action/upload-sarif@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
if: always()
with:
sarif_file: semgrep.sarif
category: semgrep-ios