SECURITY: Replace eval usage with safer alternatives #59
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The codebase uses
evalin multiple places which can lead to code injection vulnerabilities, especially when combined with unvalidated environment variables or API responses.Locations
lib/env.sh:32— SOPS decryption output parsed withevallib/issue-lifecycle.sh:57— Dynamic variable name expansionlib/issue-lifecycle.sh:74— Dynamic variable assignment withevallib/mirrors.sh:16—evalwithechofor variable expansionRisk
Recommended Fix
eval "$(sops -d ...)"with a write-validate-source pattern:sops -d file > tmp && validate tmp && source tmp— note thatsource <(sops -d ...)is equally unsafe since the decrypted output is still unsanitisedjqfor structured data access instead of dynamic variable namesReferences
evalusageUpstream: codeberg johba/disinto#818