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
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: composer
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
on: push
name: Docker build and run
permissions:
Expand All @@ -6,10 +7,10 @@ jobs:
build:
name: Docker build and run
if: '!github.event.deleted'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Docker build
run: docker build --tag github-security-jira:latest .
- name: Run in Docker
run: docker run -t --rm github-security-jira:latest --version
- uses: actions/checkout@v5
- name: Docker build
run: docker build --tag github-security-jira:latest .
- name: Run in Docker
run: docker run -t --rm github-security-jira:latest --version
21 changes: 21 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
on: pull_request
name: GitHub Actions

# Detect if this action is already running, and cancel it.
# This most likely happened because a second push has been made to a branch.
concurrency:
group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
actionlint:
name: Actionlint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: reviewdog/action-actionlint@v1
91 changes: 55 additions & 36 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,68 @@
---
on: pull_request
name: Code style review
permissions:
contents: read
pull-requests: write
jobs:
php-versions:
name: Lookup PHP versions
runs-on: ubuntu-24.04
outputs:
matrix: ${{ steps.versions.outputs.matrix }}
steps:
- uses: actions/checkout@v5
- uses: antfroger/php-version-action@v1
id: versions

review_codestyle:
name: Codestyle
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: php-versions
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v5
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 8.2
coverage: none
- name: Install Reviewdog
run: |
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $PWD/ latest
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Check codestyle
run: |
vendor/bin/phpcs bin/ src/ --report=checkstyle | ./reviewdog -f=checkstyle -name=PHPCS -reporter=github-pr-check
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v5
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install Reviewdog
run: |
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b "${PWD}/" latest
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Check codestyle
run: |
vendor/bin/phpcs bin/ src/ --report=checkstyle | ./reviewdog -f=checkstyle -name=PHPCS -reporter=github-pr-check
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

static_code_analysis:
name: Static Code Analysis
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: php-versions
strategy:
matrix:
php-version: ${{ fromJSON(needs.php-versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v5
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 8.2
coverage: none
- name: Install Reviewdog
run: |
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b $PWD/ latest
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Static code analysis
run: |
php -d memory_limit=1G vendor/bin/phpstan analyse . --error-format=checkstyle | ./reviewdog -f=checkstyle -name=PHPStan -reporter=github-pr-check
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v5
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install Reviewdog
run: |
wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b "${PWD}/" latest
- name: Install Dependencies
run: |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Static code analysis
run: |
php -d memory_limit=1G vendor/bin/phpstan analyse . --error-format=checkstyle | ./reviewdog -f=checkstyle -name=PHPStan -reporter=github-pr-check
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/yaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
on: pull_request
name: YAML

permissions:
contents: read
pull-requests: write

# Detect if this action is already running, and cancel it.
# This most likely happened because a second push has been made to a branch.
concurrency:
group: ${{ github.repository_id }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
yaml-cs-fixer:
name: Yamllint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Run Yamllint
uses: frenck/action-yamllint@v1.5.0
with:
strict: true
13 changes: 13 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

extends: default

ignore-from-file:
- .gitignore

rules:
indentation:
spaces: 2
line-length: disable
truthy:
check-keys: false
1 change: 1 addition & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Sync GitHub Security Alerts with Jira'
description: 'Synchronize the current repo alert state with JIRA and creates tickets accordingly.'
author: 'reload'
Expand Down
19 changes: 15 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"description": "Create Jira tickets for GitHub security alerts",
"license": "MIT",
"require": {
"php": ">=8.1",
"php": ">=8.3",
"softonic/graphql-client": "^2.1",
"symfony/console": "^5",
"symfony/yaml": "^6.1",
"reload/jira-security-issue": "^2.0.0"
"reload/jira-security-issue": "^2.0.10"
},
"repositories": [
{
Expand All @@ -26,10 +26,21 @@
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.2"
},
"extra": {
"composer-exit-on-patch-failure": true,
"patches": {
"lesstif/php-jira-rest-client": {
"#554: fix deprecated search to search/jql": "https://github.com/lesstif/php-jira-rest-client/pull/554/commits/0823afc040b752007cb2217a722bf3f4d4fccc5d.patch"
}
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"cweagans/composer-patches": true
}
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Loading