Function: projectile-tasks-safe-p

projectile-tasks-safe-p is a byte-compiled function defined in projectile.el.

Signature

(projectile-tasks-safe-p VALUE)

Documentation

Return non-nil if VALUE is a safe directory-local projectile-tasks.

Only an alist mapping task-name strings to command strings is considered safe. Function commands are rejected: a .dir-locals.el travels with the project, so a function value could execute arbitrary code the moment a task is run.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-tasks-safe-p (value)
  "Return non-nil if VALUE is a safe directory-local `projectile-tasks'.
Only an alist mapping task-name strings to command strings is
considered safe.  Function commands are rejected: a .dir-locals.el
travels with the project, so a function value could execute arbitrary
code the moment a task is run."
  (let ((safe t))
    (while (and safe (consp value))
      (let ((entry (car value)))
        (setq safe (and (consp entry)
                        (stringp (car entry))
                        (stringp (cdr entry)))))
      (setq value (cdr value)))
    (and safe (null value))))