diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml new file mode 100644 index 0000000..5a49939 --- /dev/null +++ b/.github/workflows/security-scan.yml @@ -0,0 +1,27 @@ +name: Security scan on all changes (Commits/PRs) + +on: + push: + branches: ['main', 'master', 'pilot', 'dev'] + pull_request: + types: + - opened + +jobs: + code-check: + runs-on: ubuntu-latest + env: + OS: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + + - name: Checkmarx One ClI Action + uses: checkmarx/ast-github-action@main + with: + project_name: PHP-v3 + cx_tenant: Flutterwave + base_uri: https://eu.ast.checkmarx.net/ + cx_client_id: ${{ secrets.CX_CLIENT_ID }} + cx_client_secret: ${{ secrets.CX_CLIENT_SECRET }} + additional_params: --scan-types sast,iac-security,api-security,sca,container-security \ No newline at end of file diff --git a/src/EventHandlers/EventTracker.php b/src/EventHandlers/EventTracker.php index 0c8ba00..4157833 100644 --- a/src/EventHandlers/EventTracker.php +++ b/src/EventHandlers/EventTracker.php @@ -27,23 +27,23 @@ public static function setResponseTime(): void */ public static function sendAnalytics($title): void { - if (self::$response_time <= 0) { - self::setResponseTime(); - } + // if (self::$response_time <= 0) { + // self::setResponseTime(); + // } - $url = 'https://kgelfdz7mf.execute-api.us-east-1.amazonaws.com/staging/sendevent'; + // $url = 'https://kgelfdz7mf.execute-api.us-east-1.amazonaws.com/staging/sendevent'; - $data = [ - 'publicKey' => getenv('PUBLIC_KEY'), - 'language' => 'PHP V3', - 'version' => '1.0.0', - 'title' => $title, - 'message' => self::$response_time, - ]; + // $data = [ + // 'publicKey' => getenv('PUBLIC_KEY'), + // 'language' => 'PHP V3', + // 'version' => '1.0.0', + // 'title' => $title, + // 'message' => self::$response_time, + // ]; - $response = (new Http(static::$config))->request($data, 'POST', $url, true); + // $response = (new Http(static::$config))->request($data, 'POST', $url, true); - self::resetTime(); + // self::resetTime(); } private static function resetTime(): void