PHP code example of arjunanda / php-vaultwatch

1. Go to this page and download the library: Download arjunanda/php-vaultwatch library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arjunanda / php-vaultwatch example snippets


use VaultWatch\Facades\VaultWatch;

// Full scan
$results = VaultWatch::scan(base_path(), ['agent' => 'full']);

// Secrets only
$results = VaultWatch::scan(base_path(), ['agent' => 'secrets']);

// With excludes
$results = VaultWatch::scan(base_path(), [
    'agent' => 'full',
    'exclude' => ['vendor', 'node_modules']
]);

VaultWatch::scan(base_path(), [
    'exclude' => ['vendor', 'node_modules', 'storage', 'public']
]);
bash
composer 

# Ignore test files
tests/
*.test.php

# Ignore specific files
config/legacy.php