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

Snyk Scan Failure #4481

Closed
nickumia-reisys opened this issue Oct 6, 2023 · 3 comments
Closed

Snyk Scan Failure #4481

nickumia-reisys opened this issue Oct 6, 2023 · 3 comments
Assignees
Labels
bug Software defect or bug GA google analytics

Comments

@nickumia-reisys
Copy link
Contributor

nickumia-reisys commented Oct 6, 2023

Related to

How to reproduce

  1. Look at failing Snyk Scan: https://github.com/GSA/catalog.data.gov/actions/workflows/snyk.yml

Expected behavior

Snyk Scan Passes.

Actual behavior

****** Error Log (CLICK ME) ******
Running setup.py develop for ckanext_googleanalytics
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [32 lines of output]
        running develop
        /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        WARNING: The user site-packages directory is disabled.
        /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        error: can't create or remove files in install directory
        
        The following error occurred while trying to add or remove files in the
        installation directory:
        
            [Errno 13] Permission denied: '/usr/local/lib/python3.10/dist-packages/test-easy-install-3674.write-test'
        
        The installation directory you specified (via --install-dir, --prefix, or
        the distutils default setting) was:
        
            /usr/local/lib/python3.10/dist-packages/
        
        Perhaps your account does not have write access to this directory?  If the
        installation directory is a system-owned directory, you may need to sign in
        as the administrator or "root" account.  If you do not have administrative
        access to this machine, you may wish to choose a different installation
        directory, preferably one that is listed in your PYTHONPATH environment
        variable.
        
        For information on other options, you may wish to consult the
        documentation at:
        
          https://setuptools.pypa.io/en/latest/deprecated/easy_install.html
        
        Please make the appropriate changes for your system and try again.
        
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
    running develop
    /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    WARNING: The user site-packages directory is disabled.
    /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    error: can't create or remove files in install directory
    
    The following error occurred while trying to add or remove files in the
    installation directory:
    
        [Errno 13] Permission denied: '/usr/local/lib/python3.10/dist-packages/test-easy-install-3674.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /usr/local/lib/python3.10/dist-packages/
    
    Perhaps your account does not have write access to this directory?  If the
    installation directory is a system-owned directory, you may need to sign in
    as the administrator or "root" account.  If you do not have administrative
    access to this machine, you may wish to choose a different installation
    directory, preferably one that is listed in your PYTHONPATH environment
    variable.
    
    For information on other options, you may wish to consult the
    documentation at:
    
      https://setuptools.pypa.io/en/latest/deprecated/easy_install.html
    
    Please make the appropriate changes for your system and try again.
    
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

image

Sketch

It seems to be an error at the intersection of setuptools and ckanext-googleanalytics. However, the only thing we have to go off is that the extension was merged into main 3 days ago. There might be some configuration that we have to accommodate in the snyk scan test, but I'm not sure.

@nickumia-reisys nickumia-reisys added the bug Software defect or bug label Oct 6, 2023
@nickumia-reisys
Copy link
Contributor Author

@hkdctol hkdctol moved this to 📔 Product Backlog in data.gov team board Oct 12, 2023
@btylerburton btylerburton added the GA google analytics label Oct 12, 2023
@nickumia nickumia mentioned this issue Oct 25, 2023
10 tasks
@Jin-Sun-tts Jin-Sun-tts self-assigned this Oct 25, 2023
@Jin-Sun-tts
Copy link
Contributor

tried locally in the ckan container, could not reproduce same error. will do not more research.

@Jin-Sun-tts
Copy link
Contributor

fixed this issue by using python 3.9 (GSA/catalog.data.gov#1116)

@github-project-automation github-project-automation bot moved this from 📔 Product Backlog to ✔ Done in data.gov team board Oct 25, 2023
@hkdctol hkdctol moved this from ✔ Done to 🗄 Closed in data.gov team board Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software defect or bug GA google analytics
Projects
Archived in project
Development

No branches or pull requests

3 participants