Skip to content

Fix security vulnerabilities found by code quality scan#909

Open
sreckoskocilic wants to merge 7 commits into
fman-users:mainfrom
sreckoskocilic:security_codescan
Open

Fix security vulnerabilities found by code quality scan#909
sreckoskocilic wants to merge 7 commits into
fman-users:mainfrom
sreckoskocilic:security_codescan

Conversation

@sreckoskocilic
Copy link
Copy Markdown

Summary

  • Hardcoded API secret in post-commit hook replaced with FMAN_API_SECRET environment variable; hook exits early if unset
  • HTTP → HTTPS for fbs package download URL in requirements/base.txt
  • Path traversal in InstallPlugin — reject plugin names containing .., /, or os.sep
  • Network timeouts added to urlopen and requests.get calls in github.py and build_impl/__init__.py
  • HTTPS enforcement for record_release_url before posting secrets
  • Popen kwarg whitelist in os_.py — only args, cwd, env, startupinfo are forwarded from plugin settings
  • Fedora repo now enables gpgcheck=1 with a gpgkey URL
  • Deprecated timestamp server replaced (symantecdigicert) in Windows signing config
  • chmod 600 on SSH key now uses check=True to fail fast on error

Test plan

  • Verify post-commit hook skips gracefully when FMAN_API_SECRET is unset
  • Confirm plugin install rejects names with path traversal characters
  • Verify network calls respect timeout settings
  • Confirm Fedora repo GPG verification works

…paring two tuples, every equality check returns True

- master -> main branch fix
- prepare_trash now calls self.move_to_trash instead of self.delete, so plugin subclasses won't permanently delete files when the user expects trashing
- NotImplementedError - unrecognized platforms fail fast with a clear message instead of a cryptic NameError
- removed shadowing basename import
- get_column_widths uses range so plugin-added columns get their widths saved/restored
…it__ always runs, even on exception.

  - util/qt/__init__.py — Added missing c_void_p import from ctypes, fixing a macOS runtime crash.
  - table.py — Fixed off-by-one: bounds check now rejects len + 1 correctly.
  - widgets.py — Added null guard on _main_window before accessing it in state change handler.
…ved, so a/b/c/../../d correctly becomes a/d.

  - session.py — Removed dead _get_startup_message method (duplicated by _show_startup_messages)
- os_.py: whitelist allowed Popen kwargs to prevent shell injection via user JSON settings
- os_.py: return empty string when /etc/os-release has no NAME= entry
- github.py: add timeout=30 to urlopen and requests.get preventing GUI hangs and socket leaks
- post-commit: replace hardcoded API secret with $FMAN_API_SECRET env var
- base.txt: fetch fbs dependency over HTTPS instead of HTTP
- windows.json: replace dead Symantec timestamp server with DigiCert
- fman.repo: enable gpgcheck and add gpgkey for RPM package verification
- commands/__init__.py: reject plugin names containing path separators or '..'
- build_impl/__init__.py: validate record_release_url uses HTTPS, add request timeout, chmod check=True, exclude .git
from cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant