Fixing applyPermissions in Vulnerability search