Skip to content

Commit db8d6ed

Browse files
committed
Add security checks.
1 parent 2d79da2 commit db8d6ed

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
name: Integrity check
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [ assigned, opened, synchronize, reopened ]
9+
schedule:
10+
- cron: '1 * * * *'
411

512
jobs:
613
build:
714
runs-on: ubuntu-latest
815

916
steps:
1017
- uses: actions/checkout@master
11-
18+
1219
- name: Install PHP
1320
uses: shivammathur/setup-php@master
1421
with:
15-
php-version: 8.0
22+
php-version: 7.4
1623

1724
- name: Install composer deps
1825
run: |
26+
composer create-project nette/code-checker temp/code-checker ^3 --no-progress
27+
composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress
28+
1929
# Install app deps
2030
composer install --no-interaction --prefer-dist
2131
32+
- name: The PHP Security Checker
33+
uses: symfonycorp/security-checker-action@v2
34+
35+
- name: Check coding standards
36+
run: |
37+
php temp/code-checker/code-checker --short-arrays --strict-types --fix --no-progress
38+
php temp/coding-standard/ecs check src --config temp/coding-standard/coding-standard-php71.yml
39+
2240
- name: Check PHPStan rules
2341
run: composer phpstan

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Baraja packages
3+
Copyright (c) 2021 Baraja packages
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"require-dev": {
1515
"phpstan/phpstan": "^0.12.52",
1616
"tracy/tracy": "^2.8",
17-
"phpstan/phpstan-nette": "^0.12.9"
17+
"phpstan/phpstan-nette": "^0.12.9",
18+
"spaze/phpstan-disallowed-calls": "^1.1"
1819
},
1920
"autoload": {
2021
"classmap": [

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
includes:
22
- vendor/phpstan/phpstan-nette/extension.neon
33
- vendor/phpstan/phpstan-nette/rules.neon
4+
- vendor/spaze/phpstan-disallowed-calls/extension.neon
5+
- vendor/spaze/phpstan-disallowed-calls/disallowed-dangerous-calls.neon
6+
- vendor/spaze/phpstan-disallowed-calls/disallowed-execution-calls.neon

0 commit comments

Comments
 (0)