Skip to content

Add ima-rpm-plugin-tests.py to validate the end-to-end workflow of the rpm-plugin-ima package. - #3257

Open
Krishan-Saraswat wants to merge 1 commit into
avocado-framework-tests:masterfrom
Krishan-Saraswat:ima-rpm-plugin
Open

Add ima-rpm-plugin-tests.py to validate the end-to-end workflow of the rpm-plugin-ima package.#3257
Krishan-Saraswat wants to merge 1 commit into
avocado-framework-tests:masterfrom
Krishan-Saraswat:ima-rpm-plugin

Conversation

@Krishan-Saraswat

Copy link
Copy Markdown
Contributor

[IBM 9.4 FEAT] Add file signature metadata to packages during build and apply it during install for POWER (crypto).

Tests covered:

  • security.selinux xattr is present on the installed binary
  • security.ima xattr is written after reinstalling with rpm-plugin-ima
  • security.ima xattr value carries a valid base64-encoded DER signature (0s prefix)
  • evmctl ima_verify confirms the IMA signature using the running kernel's ima.cer certificate
  • .ima keyring is present and contains at least one asymmetric key
  • .secondary_trusted_keys keyring is populated and links .builtin_trusted_keys
  • dracut 98integrity module-setup.sh returns 255, confirming the integrity module is intentionally excluded from the initramfs

[root@ security]# avocado run --max-parallel-tasks=1 ima-rpm-plugin-tests.py
JOB ID : 94c59ff187e75ea61d38b73d0f721862b7ab898a
JOB LOG : /home/avocado-fvt-wrapper/results/job-2026-08-09T11.14-94c59ff/job.log
(1/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_selinux_xattr_present: STARTED
(1/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_selinux_xattr_present: PASS (3.83 s)
(2/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_xattr_present: STARTED
(2/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_xattr_present: PASS (3.87 s)
(3/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_xattr_value: STARTED
(3/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_xattr_value: PASS (3.82 s)
(4/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_signature_verify: STARTED
(4/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_signature_verify: PASS (3.84 s)
(5/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_keyring: STARTED
(5/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_ima_keyring: PASS (3.82 s)
(6/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_secondary_trusted_keys_keyring: STARTED
(6/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_secondary_trusted_keys_keyring: PASS (3.83 s)
(7/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_dracut_integrity_module_disabled: STARTED
(7/7) ima-rpm-plugin-tests.py:IMARPMPlugin.test_dracut_integrity_module_disabled: PASS (3.90 s)
RESULTS : PASS 7 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/avocado-fvt-wrapper/results/job-2026-08-09T11.14-94c59ff/results.html
JOB TIME : 56.90 s

Comment thread security/ima-rpm-plugin-tests.py Outdated
rpm-plugin-ima package.

Tests covered:
- security.selinux xattr is present on the installed binary
- security.ima xattr is written after reinstalling with rpm-plugin-ima
- security.ima xattr value carries a valid base64-encoded DER signature
  (0s prefix)
- evmctl ima_verify confirms the IMA signature using the running kernel's
  ima.cer certificate
- .ima keyring is present and contains at least one asymmetric key
- .secondary_trusted_keys keyring is populated and links
  .builtin_trusted_keys
- dracut 98integrity module-setup.sh returns 255, confirming the
  integrity module is intentionally excluded from the initramfs

Signed-off-by: Krishan Gopal Saraswat <krishang@linux.ibm.com>
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.

2 participants