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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
19 changes: 19 additions & 0 deletions .github/workflows/pr-title-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR title lint

# pull_request_target (not pull_request) so this also runs for PRs from forks -
# safe here since the action only reads the PR title, it never checks out or
# executes the fork's code.
on:
pull_request_target:
types: [opened, edited, synchronize, reopened]

permissions:
pull-requests: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: release-please

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
release-type: simple
46 changes: 46 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: security-scan

on:
pull_request:
push:
branches: [main]

permissions:
contents: read
security-events: write

jobs:
psalm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer

- run: composer install --no-interaction --no-progress

# continue-on-error so a failing scan doesn't skip the SARIF upload below -
# findings should reach the Security tab even when they fail the job.
- name: Run Psalm taint analysis
id: psalm
run: vendor/bin/psalm --taint-analysis --no-progress --report=psalm-results.sarif
continue-on-error: true

# continue-on-error too: GITHUB_TOKEN is forced read-only on pull_request
# runs triggered from forks, regardless of the security-events: write
# permission declared above, so this step fails on every fork PR
# (this repo has external contributors - see PR #5) for a reason
# unrelated to Psalm's actual findings. Without this, that failure
# would be indistinguishable from a real security finding.
- name: Upload results to code scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: psalm-results.sarif
continue-on-error: true

- name: Fail the job if Psalm found issues
if: steps.psalm.outcome == 'failure'
run: exit 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.idea
.project
.settings
vendor
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "aehrc/redcap-fhir-ontology-provider",
"description": "REDCap external module providing FHIR-based ontology autocomplete",
"type": "project",
"require-dev": {
"vimeo/psalm": "^6.16"
}
}
Loading
Loading