mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	* add semgrep yml * add semgrep ci job * remove replication semgrep rule in oss * fix makefile * add semgrep to ci * upwind triple if in ui.go semgrep refactoring
		
			
				
	
	
		
			21 lines
		
	
	
		
			498 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			498 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
set -e
 | 
						|
set -x
 | 
						|
 | 
						|
## Make a temp dir
 | 
						|
tempdir=$(mktemp -d plugin-semgrep.XXXXXX)
 | 
						|
vaultdir=$(pwd)
 | 
						|
## Set paths
 | 
						|
cd $tempdir
 | 
						|
 | 
						|
for plugin in $(grep github.com/hashicorp/vault-plugin- $vaultdir/go.mod | cut -f 2 | cut -d ' ' -f 1 | cut -d '/' -f 3)
 | 
						|
do
 | 
						|
	if [ -z $SKIP_MODULE_UPDATING ]
 | 
						|
	then
 | 
						|
		echo "Fetching $plugin..."
 | 
						|
		git clone https://github.com/hashicorp/$plugin
 | 
						|
        semgrep --include '*.go' --exclude 'vendor' -a -f $vaultdir/tools/semgrep/ci/ $plugin/. > $plugin.semgrep.txt
 | 
						|
	fi
 | 
						|
done
 |