Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка при сканировании - TypeError: argument of type 'NoneType' is not iterable #1

Open
kremlsa opened this issue Jul 17, 2024 · 0 comments

Comments

@kremlsa
Copy link

kremlsa commented Jul 17, 2024

Пример job:

stages:
  - scan

oci-ics:
  before_script:
    # Install git and podman
    - apt-get update -qq && apt-get install -y -qq git podman
  stage: scan
  allow_failure: true
  variables:
    GIT_STRATEGY: none
    COMPLIANCE_IMAGE_FULL_REF: registry.hub.docker.com/library/python:latest
  image:
    name: python:3.10.10
  script:
    # Clone repo and run script
    - git clone https://github.com/Swordfish-Security/OCI-image-compliance-scanner.git
    - python3 OCI-image-compliance-scanner/scan.py COMPLIANCE_IMAGE_FULL_REF

Ошибка при сканировании:

PASS. Severity: Informational. Parameters CMD, ENTRYPOINT. The image has startup parameters set in CMD ['python3'].
    main(image)
  File "/builds/alexander.kremlev/VulnApp/OCI-image-compliance-scanner/scan.py", line 127, in main
    results.append(image_obj.fileCheck('-perm -4000', 'suid bit', data))
  File "/builds/alexander.kremlev/VulnApp/OCI-image-compliance-scanner/module/compliance_checks.py", line 240, in fileCheck
    dirs = _getLayersDirs(data)
  File "/builds/alexander.kremlev/VulnApp/OCI-image-compliance-scanner/module/compliance_checks.py", line 11, in _getLayersDirs
    if 'LowerDir' in d:
TypeError: argument of type 'NoneType' is not iterable
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit code 1
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

No branches or pull requests

1 participant