# .github/workflows/web-sentinel-scan.yml
name: 'Web Sentinel Security Scan'
description: 'Analyse de sécurité automatique avec Web Sentinel'
author: 'Web Sentinel Team'

inputs:
  api_key:
    description: 'Clé API Web Sentinel'
    required: true
  
  source_path:
    description: 'Chemin vers le code source à analyser'
    required: false
    default: '.'
  
  languages:
    description: 'Langages à analyser (php,javascript,python,java,csharp,go)'
    required: false
    default: 'auto'
  
  severity_min:
    description: 'Niveau de sévérité minimum (info,low,medium,high,critical)'
    required: false
    default: 'medium'
  
  fail_on_findings:
    description: 'Échouer le build si des vulnérabilités sont trouvées'
    required: false
    default: 'true'
  
  upload_sarif:
    description: 'Upload SARIF pour GitHub Security tab'
    required: false
    default: 'true'

runs:
  using: 'docker'
  image: 'docker://websentinel/github-action:latest'
  env:
    WS_API_KEY: ${{ inputs.api_key }}
    WS_SOURCE_PATH: ${{ inputs.source_path }}
    WS_LANGUAGES: ${{ inputs.languages }}
    WS_SEVERITY_MIN: ${{ inputs.severity_min }}
    WS_FAIL_ON_FINDINGS: ${{ inputs.fail_on_findings }}
    WS_UPLOAD_SARIF: ${{ inputs.upload_sarif }}

branding:
  icon: 'shield'
  color: 'red'