You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
declare(strict_types=1);
namespace App\Scrubber\RegexCollection;
use YorCreative\Scrubber\Interfaces\RegexCollectionInterface;
class GitHub_pat implements RegexCollectionInterface
{
public function getPattern(): string
{
return 'github_pat\w+';
}
public function getTestableString(): string
{
return 'github_pat_21BAP3XSDQ03ax56AASD8Z6_IyX2VEsSa7aDasd1jHLfENuuU0HW9rROK1CiuaM1GDBAQF6Tj0b5OLGA';
}
public function getReplacementValue(): string
{
return config('scrubber.redaction');
}
public function isSecret(): bool
{
return false;
}
}
and included it like that:
<?php
declare(strict_types=1);
use YorCreative\Scrubber\Repositories\RegexCollection;
return [
'redaction' => '**redacted**',
'secret_manager' => [
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
'enabled' => false,
],
'regex_loader' => [
RegexCollection::$GOOGLE_API,
RegexCollection::$AUTHORIZATION_BEARER,
RegexCollection::$CREDIT_CARD_AMERICAN_EXPRESS,
RegexCollection::$CREDIT_CARD_DISCOVER,
RegexCollection::$CREDIT_CARD_VISA,
RegexCollection::$JSON_WEB_TOKEN,
'GitHub_pat'
],
'tap_channels' => ['*'] // Opt-in to tap specific log channels OR include all with * wildcard.
];
Hi there,
I'd like to redact some sensitive information like this:
I created a custom RegEx-Collection like this:
and included it like that:
What did I miss? The regex however, should match: https://regex101.com/r/ecDvxq/1
The text was updated successfully, but these errors were encountered: