Commit 2fd06ab2 authored by Protocole's avatar Protocole
Browse files

Merge branch 'latest' into 'latest'

New job: security checker for php packages

See merge request r2devops/hub!217
parents b82aaad4 c806f238
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
## Objective

This job checks if your PHP application depends on PHP packages with known security vulnerabilities.

## How to use it

1. Add this job URL inside the `include` list of your `.gitlab-ci.yml` file (see the [quick setup](/use-the-hub/#quick-setup)). You can specify [a fixed version](#changelog) instead of `latest`.
    ```yaml
      - remote: 'https://jobs.r2devops.io/latest/php_security_checker.yml'
    ```
1. If you need to customize the job (stage, variables, ...) 👉 check the [jobs
   customization](/use-the-hub/#jobs-customization)
1. By default, the output is optimized for terminals, change it via the variable `FORMAT_OUTPUT` (supported formats: `ansi`, `markdown`, `json`, and `yaml`):
  `--format=json`
1. Well done, your job is ready to work ! 😀

## Job details

* Job name: `php_security_checker`
* Docker image:
[`1.55-php7.4`](https://hub.docker.com/r/jakzal/phpqa/)
* Default stage: `static_tests`
* When: `always`

### Variables

| Name | Description | Default |
| ---- | ----------- | ------- |
| `COMPOSER_PATH` <img width=100/> | A general variable for this job <img width=175/>| `./composer.lock` <img width=100/>|
| `FORMAT_OUTPUT` <img width=100/> | A variable for the format of the output<img width=175/>| ` ` <img width=100/>|
+15 −0
Original line number Diff line number Diff line
name: php_security_checker
description: PHP security-checker is a job that checks if your PHP application depends on PHP packages with known security vulnerabilities.
default_stage: static_tests
icon: 👮‍♂️
maintainer: melheb.younes
license: MIT
images:
  "jakzal/phpqa": "1.55-php7.4"
tools:
  "php": "1.55-php7.4"
labels:
  - GitLab
  - PHP
  - Composer
  - Security
+13 −0
Original line number Diff line number Diff line
stages:
  - static_tests

php_security_checker:
    image: 
      name: jakzal/phpqa:1.55-php7.4
      entrypoint: [""]
    stage: static_tests
    variables:
      COMPOSER_PATH: "./composer.lock"
      FORMAT_OUTPUT: ""
    script:
      - local-php-security-checker  --path="${CI_PROJECT_DIR}/${COMPOSER_PATH}" $FORMAT_OUTPUT
 No newline at end of file
+0 −0

Empty file added.

+1 −0
Original line number Diff line number Diff line
* Initial version
 No newline at end of file