Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: TODOs #713

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Security Check

on:
push:
branches: [ main ]
pull_request:
release:
types: [ created ]

jobs:
security:
runs-on: ubuntu-latest
name: PHP Security Checker
strategy:
fail-fast: false
matrix:
php: [ '8.1' ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Cache the vulnerability database
uses: actions/cache@v2
id: cache-db
with:
path: ~/.symfony/cache
key: db

- name: Checks dependencies for known vulnerabilities
uses: symfonycorp/security-checker-action@v4
1 change: 1 addition & 0 deletions src/Composer/ComposerOrchestrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private static function generateAutoloadStatements(

private static function retrieveComposerExecutable(): string
{
// TODO: add env variable; check that env variables are not changed in the scoped version
$executableFinder = new ExecutableFinder();
$executableFinder->addSuffix('.phar');

Expand Down
2 changes: 2 additions & 0 deletions src/Test/RequiresPharReadonlyOff.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ trait RequiresPharReadonlyOff
{
private function markAsSkippedIfPharReadonlyIsOn(): void
{
// Should be supported in PHPUnit9 already
// TOOD: @require setting is missing from the doc; can contribute
if (true === (bool) ini_get('phar.readonly')) {
$this->markTestSkipped(
'Requires phar.readonly to be set to 0. Either update your php.ini file or run this test with '
Expand Down
1 change: 1 addition & 0 deletions tests/BoxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,7 @@ public function test_it_cannot_compress_the_phar_with_an_unknown_algorithm(int $
public function test_it_cannot_compress_if_the_required_extension_is_not_loaded(): void
{
if (extension_loaded('bz2')) {
// TODO: should be supported<
$this->markTestSkipped('Requires the extension bz2 to not be loaded.');
}

Expand Down