Skip to contents

In some GitHub actions, you can pass an arbitrary R vector in and we will parse it. Unfortunately, this can lead to the insertion of malicious code, so this function will thrown an error if the submitted R expression is anything but a vector created with c(),

Usage

verify_simple_vector(inputs)

Arguments

inputs

an R expression

Value

nothing. this is called for its side-effect. if inputs is not a simple vector, an error will be thrown.

Examples

# simple vectors work. 
try(vise::verify_simple_vector(c(1, "a", c(TRUE, FALSE))))

# vectors using any other function fail, even if they are harmless
try(vise::verify_simple_vector(c(1, print("a"), c(TRUE, FALSE))))