This repository implements the following security measures in GitHub Actions workflows:
- User-controlled data (PR titles, usernames, etc.) are passed through environment variables and file-based mechanisms instead of being directly interpolated into shell commands
- All version strings are validated against semantic versioning patterns before use
- Changelog extraction uses safe variable passing in AWK scripts
- All GitHub Actions are pinned to specific versions with comments for maintainability
- Regular updates to action versions should be performed to get security patches
- Temporary files use
mktemp -dfor secure directory creation - File operations are restricted to specific directories with
-maxdepthflags - Symlinks are not followed in
findoperations - Proper cleanup with trap handlers
- Version numbers are validated against semantic versioning regex patterns
- File paths are sanitized before use
- Special characters are filtered from user input
- Secrets are only exposed where necessary
- EXPO_TOKEN is passed directly to commands rather than redundantly in environment
When modifying workflows, follow these guidelines:
-
Never interpolate user-controlled data directly in shell commands
- Bad:
echo "Title: ${{ github.event.pull_request.title }}" - Good: Use environment variables and file-based approaches
- Bad:
-
Always validate input format
- Use regex patterns to validate versions, paths, and other inputs
- Reject invalid input early
-
Pin action versions
- Use specific version tags (e.g.,
@v4.2.2) - Consider using commit SHAs for maximum security
- Use specific version tags (e.g.,
-
Limit permissions
- Use minimum required permissions for each job
- Avoid
permissions: write-all
-
Use secure temporary files
- Use
mktemp -dfor temporary directories - Set up trap handlers for cleanup
- Avoid predictable paths in
/tmp
- Use
-
Restrict file operations
- Use
-maxdepthwith find commands - Don't follow symlinks unless necessary
- Validate paths before file operations
- Use
If you discover a security vulnerability, please report it by:
- Creating a private security advisory on GitHub
- Emailing the maintainers directly (if configured)
Please do not open public issues for security vulnerabilities.
- Security patches are applied as soon as possible
- Action versions are reviewed quarterly for updates
- Dependencies are monitored for known vulnerabilities