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

Having . in requierements.txt leads snyk to fail to load requirements in python projects #249

Open
leo-licon opened this issue Nov 11, 2024 · 0 comments

Comments

@leo-licon
Copy link

leo-licon commented Nov 11, 2024

Having . in requirement.txt in python projects leads Snyk CLI to fail to load the project and is not able to perform test or monitor actions.

Is there a way to modify the pattern for requirement name in requirement.py lines 33-84 to include . to not be just ascii letters and digits?

ALPHANUM = Word(string.ascii_letters + string.digits)
....

IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))
......

NAME = IDENTIFIER("name")

.......

NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)

REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd

sample (valid for PIP) requirements.txt:

requests
atomicwrites==1.4.0
colorama==0.4.3
.

This is The output from Snyk CLI:

>$ snyk test --package-manager=pip

Failed to test pip project

Debbuging the call, this is the output:

>$ snyk test --package-manager=pip -d

2024-11-07T15:35:52Z main - Using log level: debug
2024-11-07T15:35:53Z main - > request [0x140005ebd40]: GET https://api.snyk.io/rest/self?version=2024-04-22
2024-11-07T15:35:53Z main - > request [0x140005ebd40]: header: map[Authorization:[Bearer ***] Session-Token:[Bearer ***]]
2024-11-07T15:35:53Z main - < response [0x140005ebd40]: 200 OK
2024-11-07T15:35:53Z main - < response [0x140005ebd40]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993753.14bd5d2a] Content-Length:[494] Content-Type:[application/vnd.api+json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:53 GMT] Server:[envoy] Snyk-Request-Id:[5179429b-9a5d-4edc-b72c-aecd4a26a8fc] Snyk-Version-Lifecycle-Stage:[ga] Snyk-Version-Requested:[2024-04-22] Snyk-Version-Served:[2024-04-22] Strict-Transport-Security:[max-age=31536000; preload] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[14] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:54Z main - > request [0x14000859320]: GET https://api.snyk.io/rest/self?version=2024-04-22
2024-11-07T15:35:54Z main - > request [0x14000859320]: header: map[Authorization:[Bearer ***] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[534aca4a-8460-409b-aa01-cc9b756c82d7] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:54Z main - < response [0x14000859320]: 200 OK
2024-11-07T15:35:54Z main - < response [0x14000859320]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993753.14bd6880] Content-Length:[494] Content-Type:[application/vnd.api+json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:54 GMT] Server:[envoy] Snyk-Request-Id:[534aca4a-8460-409b-aa01-cc9b756c82d7] Snyk-Version-Lifecycle-Stage:[ga] Snyk-Version-Requested:[2024-04-22] Snyk-Version-Served:[2024-04-22] Strict-Transport-Security:[max-age=31536000; preload] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[11] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:54Z main - Version:               1.1293.1
2024-11-07T15:35:54Z main - Platform:              darwin arm64
2024-11-07T15:35:54Z main - API:                   https://api.snyk.io
2024-11-07T15:35:54Z main - 
2024-11-07T15:35:54Z main - 
2024-11-07T15:35:54Z main - Insecure HTTPS:        false
2024-11-07T15:35:54Z main - Analytics:             enabled
2024-11-07T15:35:54Z main - 
2024-11-07T15:35:54Z main - 
2024-11-07T15:35:54Z main - Features:
2024-11-07T15:35:54Z main -   preview:             disabled
2024-11-07T15:35:54Z main -   fips:                Not available
2024-11-07T15:35:54Z main - Checks:
2024-11-07T15:35:54Z main -   Configuration:       all good
2024-11-07T15:35:54Z main - Using Legacy CLI to serve the command. (reason: unknown command "test" for "snyk")
2024-11-07T15:35:54Z legacycli:1 - Arguments:[test --package-manager=pip -d]
2024-11-07T15:35:54Z legacycli:1 - Use StdIO:true
2024-11-07T15:35:54Z legacycli:1 - Working directory:
2024-11-07T15:35:54Z legacycli:1 - Authentication: Oauth token *** delegated to Extensible CLI.
2024-11-07T15:35:54Z legacycli:1 - Init start
2024-11-07T15:35:54Z legacycli:1 - 
2024-11-07T15:35:54Z legacycli:1 - Validating sha256 of /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/snyk-macos-arm64
2024-11-07T15:35:54Z legacycli:1 - expected:  
2024-11-07T15:35:54Z legacycli:1 - actual:    
2024-11-07T15:35:54Z legacycli:1 - Extraction not required
2024-11-07T15:35:54Z legacycli:1 - Init end
2024-11-07T15:35:54Z legacycli:1 - Temporary CertificateLocation: /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/tmp/pid7086/snyk-cli-cert-2066194154.crt
2024-11-07T15:35:54Z legacycli:1 - Enabled Proxy Authentication Mechanism: Anyauth
2024-11-07T15:35:54Z legacycli:1 - starting proxy
2024-11-07T15:35:54Z legacycli:1 - Wrapper proxy is listening on port: 61892
2024-11-07T15:35:54Z main - > request [0x140006e5440]: GET https://api.snyk.io/rest/self?version=2024-04-22
2024-11-07T15:35:54Z main - > request [0x140006e5440]: header: map[Authorization:[Bearer ***] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[0b6964ab-9945-49a3-a9fb-7ba255b6d536] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:54Z main - < response [0x140006e5440]: 200 OK
2024-11-07T15:35:54Z main - < response [0x140006e5440]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993754.14bd7612] Content-Length:[494] Content-Type:[application/vnd.api+json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:54 GMT] Server:[envoy] Snyk-Request-Id:[0b6964ab-9945-49a3-a9fb-7ba255b6d536] Snyk-Version-Lifecycle-Stage:[ga] Snyk-Version-Requested:[2024-04-22] Snyk-Version-Served:[2024-04-22] Strict-Transport-Security:[max-age=31536000; preload] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[16] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:54Z legacycli:1 - Launching:
2024-11-07T15:35:54Z legacycli:1 - /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/snyk-macos-arm64
2024-11-07T15:35:54Z legacycli:1 - With Arguments:
2024-11-07T15:35:54Z legacycli:1 - test, --package-manager=pip, -d
2024-11-07T15:35:54Z legacycli:1 - With Environment:
2024-11-07T15:35:54Z legacycli:1 - NODE_EXTRA_CA_CERTS = /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/tmp/pid7086/snyk-cli-cert-2066194154.crt
2024-11-07T15:35:54Z legacycli:1 - HTTPS_PROXY = http://***@127.0.0.1:61892
2024-11-07T15:35:54Z legacycli:1 - HTTP_PROXY = http://***@127.0.0.1:61892
2024-11-07T15:35:54Z legacycli:1 - NO_PROXY = localhost,127.0.0.1,::1
2024-11-07T15:35:54Z legacycli:1 - SNYK_SYSTEM_HTTPS_PROXY =
2024-11-07T15:35:54Z legacycli:1 - SNYK_SYSTEM_HTTP_PROXY =
2024-11-07T15:35:54Z legacycli:1 - SNYK_SYSTEM_NO_PROXY =
2024-11-07T15:35:54.931Z snyk test <ref *1> { _: [ [Circular *1] ], debug: true, packageManager: 'pip' }
2024-11-07T15:35:55.386Z snyk using proxy: http://***@127.0.0.1:61892
2024-11-07T15:35:55Z legacycli:1 - [001] INFO: Running 1 CONNECT handlers
2024-11-07T15:35:55Z legacycli:1 - HandleConnect - basic authentication result: &{0 <nil> 0x1027d2f50}api.snyk.io:443
2024-11-07T15:35:55Z legacycli:1 - [001] INFO: on 0th handler: &{2 <nil> 0x1027d2be0} api.snyk.io:443
2024-11-07T15:35:55Z legacycli:1 - [001] INFO: Assuming CONNECT is TLS, mitm proxying it
2024-11-07T15:35:55Z legacycli:1 - [001] INFO: signing for api.snyk.io
2024-11-07T15:35:55Z legacycli:1 - [002] INFO: req api.snyk.io:443
2024-11-07T15:35:55Z legacycli:1 - > request [0x140005eaa20]: GET https://api.snyk.io:443/v1/cli-config/feature-flags/enablePnpmCli?org=
2024-11-07T15:35:55Z legacycli:1 - > request [0x140005eaa20]: header: map[Accept:[application/json] Authorization:[Bearer ***] Connection:[close] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[62e2f61d-07f1-4a4d-99f2-dfeb285cbc40] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:55Z legacycli:1 - [002] INFO: Sending request GET https://api.snyk.io:443/v1/cli-config/feature-flags/enablePnpmCli?org=
2024-11-07T15:35:56Z legacycli:1 - [002] INFO: resp 403 Forbidden
2024-11-07T15:35:56Z legacycli:1 - < response [0x140005eaa20]: 403 Forbidden
2024-11-07T15:35:56Z legacycli:1 - < response [0x140005eaa20]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993756.14bd8c16] Connection:[keep-alive] Content-Length:[92] Content-Security-Policy:[base-uri https://app.snyk.io; script-src 'self' 'nonce-k20EIXrsDAzw+2G6yvNfDg==' 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' 'report-sample'; img-src https: data:; object-src 'none'; frame-ancestors https://app.snyk.io https://learn.snyk.io https://login.snyk.io https://security.snyk.io; report-to csp-report-group; report-uri https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd;] Content-Type:[application/json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:56 GMT] Report-To:[{"group":"csp-report-group","max_age":1800,"endpoints":[{"url":"https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd"}],"include_subdomains":true}] Snyk-Request-Id:[62e2f61d-07f1-4a4d-99f2-dfeb285cbc40] Strict-Transport-Security:[max-age=31536000; preload] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:56Z legacycli:1 - < response [0x140005eaa20]: body: {"ok":false,"userMessage":"Org choicehotels doesn't have 'enable-pnpm-cli' feature enabled"}
2024-11-07T15:35:56Z legacycli:1 - [001] INFO: Exiting on EOF
2024-11-07T15:35:56.664Z snyk:run-test Error running test {
  error: 'Traceback (most recent call last):\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/packaging/requirements.py", line 102, in __init__\n' +
    '    req = REQUIREMENT.parseString(requirement_string)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1654, in parseString\n' +
    '    raise exc\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1644, in parseString\n' +
    '    loc, tokens = self._parse( instring, 0 )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1402, in _parseNoCache\n' +
    '    loc,tokens = self.parseImpl( instring, preloc, doActions )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 3417, in parseImpl\n' +
    '    loc, exprtokens = e._parse( instring, loc, doActions )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1402, in _parseNoCache\n' +
    '    loc,tokens = self.parseImpl( instring, preloc, doActions )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 3739, in parseImpl\n' +
    '    return self.expr._parse( instring, loc, doActions, callPreParse=False )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1402, in _parseNoCache\n' +
    '    loc,tokens = self.parseImpl( instring, preloc, doActions )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 3400, in parseImpl\n' +
    '    loc, resultlist = self.exprs[0]._parse( instring, loc, doActions, callPreParse=False )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 1406, in _parseNoCache\n' +
    '    loc,tokens = self.parseImpl( instring, preloc, doActions )\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/pyparsing.py", line 2711, in parseImpl\n' +
    '    raise ParseException(instring, loc, self.errmsg, self)\n' +
    'pkg_resources_py3._vendor.pyparsing.ParseException: Expected W:(abcd...) (at char 0), (line:1, col:1)\n' +
    '\n' +
    'During handling of the above exception, another exception occurred:\n' +
    '\n' +
    'Traceback (most recent call last):\n' +
    '  File "/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pip_resolve.py", line 533, in <module>\n' +
    '    sys.exit(main())\n' +
    '  File "/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pip_resolve.py", line 523, in main\n' +
    '    create_dependencies_tree_by_req_file_path(\n' +
    '  File "/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pip_resolve.py", line 450, in create_dependencies_tree_by_req_file_path\n' +
    '    required = get_requirements_list(requirements_file_path, dev_deps=dev_deps)\n' +
    '  File "/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pip_resolve.py", line 414, in get_requirements_list\n' +
    '    req_list = get_requirements_for_pip(requirements_file_path)\n' +
    '  File "/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pip_resolve.py", line 368, in get_requirements_for_pip\n' +
    '    req_list = list(requirements.parse(f))\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/requirements/parser.py", line 78, in parse\n' +
    '    req = Requirement.parse(line)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/requirements/requirement.py", line 240, in parse\n' +
    '    return cls.parse_line(line)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/requirements/requirement.py", line 218, in parse_line\n' +
    '    pkg_req = Req.parse(line)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/__init__.py", line 3154, in parse\n' +
    '    req, = parse_requirements(s)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/__init__.py", line 3099, in parse_requirements\n' +
    '    yield Requirement(line)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/__init__.py", line 3109, in __init__\n' +
    '    super(Requirement, self).__init__(requirement_string)\n' +
    '  File "/private/var/folders/r5/4txn5vfn3kj550nlhd35xxg00000gn/T/tmp-7090-upnYNwCEi56j/pkg_resources_py3/_vendor/packaging/requirements.py", line 104, in __init__\n' +
    '    raise InvalidRequirement(\n' +
    `pkg_resources_py3.extern.packaging.requirements.InvalidRequirement: Parse error at "'<project'": Expected W:(abcd...)\n`
}
2024-11-07T15:35:56.665Z snyk-test Failed to test 1 projects, errors:
2024-11-07T15:35:56.939Z snyk-test error: FailedToRunTestError: Failed to test pip project
    at runTest (/snapshot/project/dist/cli/webpack:/snyk/src/lib/snyk-test/run-test.ts:405:11)
    at test (/snapshot/project/dist/cli/webpack:/snyk/src/cli/commands/test/index.ts:156:13)
    at runCommand (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:56:25)
    at main (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:343:11)
    at /snapshot/project/dist/cli/webpack:/snyk/src/cli/index.ts:13:3
    at callHandlingUnexpectedErrors (/snapshot/project/dist/cli/webpack:/snyk/src/lib/unexpected-error.ts:28:5)
Error:
Testing /Users/leolicon/projects/admin-utilijob...

Failed to test pip project
    at test (/snapshot/project/dist/cli/webpack:/snyk/src/cli/commands/test/index.ts:294:19)
    at runCommand (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:56:25)
    at main (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:343:11)
    at /snapshot/project/dist/cli/webpack:/snyk/src/cli/index.ts:13:3
    at callHandlingUnexpectedErrors (/snapshot/project/dist/cli/webpack:/snyk/src/lib/unexpected-error.ts:28:5)
2024-11-07T15:35:56.942Z snyk Exit code: 2
2024-11-07T15:35:56.943Z snyk analytics {
  "args": [
    {
      "debug": true,
      "packageManager": "pip"
    }
  ],
  "command": "bad-command",
  "metadata": {
    "upgradable-snyk-protect-paths": 0,
    "local": true,
    "error-message": "\nTesting /Users/leolicon/projects/admin-utilijob...\n\nFailed to test pip project",
    "error": "Error: \nTesting /Users/leolicon/projects/admin-utilijob...\n\nFailed to test pip project\n    at test (/snapshot/project/dist/cli/webpack:/snyk/src/cli/commands/test/index.ts:294:19)\n    at runCommand (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:56:25)\n    at main (/snapshot/project/dist/cli/webpack:/snyk/src/cli/main.ts:343:11)\n    at /snapshot/project/dist/cli/webpack:/snyk/src/cli/index.ts:13:3\n    at callHandlingUnexpectedErrors (/snapshot/project/dist/cli/webpack:/snyk/src/lib/unexpected-error.ts:28:5)",
    "error-code": 500,
    "command": "test"
  },
  "os": "macOS",
  "osPlatform": "darwin",
  "osRelease": "23.6.0",
  "osArch": "arm64",
  "version": "1.1293.1",
  "nodeVersion": "v18.5.0",
  "standalone": true,
  "integrationName": "CLI_V1_PLUGIN",
  "integrationVersion": "1.1293.1",
  "integrationEnvironment": "",
  "integrationEnvironmentVersion": "",
  "id": "147adbc0d1c2c3010103a8730122558226db629e",
  "ci": false,
  "durationMs": 2012,
  "metrics": {
    "network_time": {
      "type": "timer",
      "values": [
        886
      ],
      "total": 886
    },
    "cpu_time": {
      "type": "synthetic",
      "values": [
        1126
      ],
      "total": 1126
    }
  }
}
2024-11-07T15:35:56.943Z snyk sending request to: https://api.snyk.io/v1/analytics/cli
2024-11-07T15:35:56.943Z snyk request body size: 1291
2024-11-07T15:35:56.943Z snyk gzipped request body size: 608
2024-11-07T15:35:56.944Z snyk using proxy: http://***@127.0.0.1:61892
2024-11-07T15:35:56Z legacycli:1 - [003] INFO: Running 1 CONNECT handlers
2024-11-07T15:35:56Z legacycli:1 - HandleConnect - basic authentication result: &{0 <nil> 0x1027d2f50}api.snyk.io:443
2024-11-07T15:35:56Z legacycli:1 - [003] INFO: on 0th handler: &{2 <nil> 0x1027d2be0} api.snyk.io:443
2024-11-07T15:35:56Z legacycli:1 - [003] INFO: Assuming CONNECT is TLS, mitm proxying it
2024-11-07T15:35:56Z legacycli:1 - [003] INFO: signing for api.snyk.io
2024-11-07T15:35:57Z legacycli:1 - [004] INFO: req api.snyk.io:443
2024-11-07T15:35:57Z legacycli:1 - > request [0x14003daea20]: POST https://api.snyk.io:443/v1/analytics/cli
2024-11-07T15:35:57Z legacycli:1 - > request [0x14003daea20]: header: map[Accept:[application/json] Authorization:[Bearer ***] Connection:[close] Content-Encoding:[gzip] Content-Length:[608] Content-Type:[application/json; charset=utf-8] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[a96a6c52-f179-4c9a-b506-c3fa1a20ebcd] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:57Z legacycli:1 - [004] INFO: Sending request POST https://api.snyk.io:443/v1/analytics/cli
2024-11-07T15:35:57Z legacycli:1 - [004] INFO: resp 200 OK
2024-11-07T15:35:57Z legacycli:1 - < response [0x14003daea20]: 200 OK
2024-11-07T15:35:57Z legacycli:1 - < response [0x14003daea20]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993757.14bd8fd9] Connection:[keep-alive] Content-Length:[11] Content-Security-Policy:[base-uri https://app.snyk.io; script-src 'self' 'nonce-Uu1pO76hinJuER74mo1kDQ==' 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' 'report-sample'; img-src https: data:; object-src 'none'; frame-ancestors https://app.snyk.io https://learn.snyk.io https://login.snyk.io https://security.snyk.io; report-to csp-report-group; report-uri https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd;] Content-Type:[application/json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:57 GMT] Report-To:[{"group":"csp-report-group","max_age":1800,"endpoints":[{"url":"https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd"}],"include_subdomains":true}] Snyk-Request-Id:[a96a6c52-f179-4c9a-b506-c3fa1a20ebcd] Strict-Transport-Security:[max-age=31536000; preload] Vary:[X-HTTP-Method-Override, Accept-Encoding] X-Content-Type-Options:[nosniff] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:57Z legacycli:1 - [003] INFO: Exiting on EOF
2024-11-07T15:35:57Z main - Deriving Exit Code 2 (cause: exit status 2)
2024-11-07T15:35:57Z internal.cleanup:2 - Deleted temporary certificate file: /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/tmp/pid7086/snyk-cli-cert-2066194154.crt
2024-11-07T15:35:57Z internal.cleanup:2 - Deleted temporary directory: /Users/leolicon/Library/Caches/snyk/snyk-cli/1.1293.1/tmp/pid7086
2024-11-07T15:35:57Z main - Sending Instrumentation
2024-11-07T15:35:57Z analytics.report:3 - analytics.report workflow start
2024-11-07T15:35:57Z main - > request [0x1400402b320]: GET https://api.snyk.io/rest/self?version=2024-04-22
2024-11-07T15:35:57Z main - > request [0x1400402b320]: header: map[Authorization:[Bearer ***] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[96b692de-58fe-4295-b699-06e8413b1ab3] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:57Z main - < response [0x1400402b320]: 200 OK
2024-11-07T15:35:57Z main - < response [0x1400402b320]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993757.14bdab40] Content-Length:[494] Content-Type:[application/vnd.api+json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:58 GMT] Server:[envoy] Snyk-Request-Id:[96b692de-58fe-4295-b699-06e8413b1ab3] Snyk-Version-Lifecycle-Stage:[ga] Snyk-Version-Requested:[2024-04-22] Snyk-Version-Served:[2024-04-22] Strict-Transport-Security:[max-age=31536000; preload] Vary:[Accept-Encoding] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[12] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:57Z analytics.report:3 - adding command line input
2024-11-07T15:35:57Z analytics.report:3 - [0] Processing element
2024-11-07T15:35:57Z analytics.report:3 - [0] Schema Version: 2
2024-11-07T15:35:57Z analytics.report:3 - [0] Data: {"data":{"attributes":{"interaction":{"categories":["oss","test","package-manager"],"errors":[],"extension":{"exitcode":2},"id":"urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665","results":[],"stage":"dev","status":"failure","target":{"id":"pkg:git/bitbucket.org/xxxxxxxxxx/admin-utilijob@358f36876daf7c579c15415bb061c069934a1bac?branch=master"},"timestamp_ms":1730993752643,"type":""},"runtime":{"application":{"name":"snyk-cli","version":"1.1293.1"},"performance":{"duration_ms":4681},"platform":{"arch":"arm64","os":"darwin"}}},"type":""}}
2024-11-07T15:35:58Z main - > request [0x140040ad200]: POST https://api.snyk.io/hidden/orgs/826f2939-5138-4ef6-8ba5-1089c18ed70e/analytics?version=2024-03-07~experimental
2024-11-07T15:35:58Z main - > request [0x140040ad200]: header: map[Authorization:[Bearer ***] Content-Type:[application/json] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[a6807271-9f50-45ff-94f6-e3984a79f0fc] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:58Z main - < response [0x140040ad200]: 201 Created
2024-11-07T15:35:58Z main - < response [0x140040ad200]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993758.14bdb665] Content-Length:[2] Content-Type:[application/json] Date:[Thu, 07 Nov 2024 15:35:58 GMT] Deprecation:[2024-10-15] Server:[envoy] Snyk-Request-Id:[a6807271-9f50-45ff-94f6-e3984a79f0fc] Snyk-Version-Lifecycle-Stage:[experimental] Snyk-Version-Requested:[2024-03-07~experimental] Snyk-Version-Served:[2024-03-07~experimental] Strict-Transport-Security:[max-age=31536000; preload] Sunset:[2024-04-06] X-Content-Type-Options:[nosniff] X-Envoy-Upstream-Service-Time:[0] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:58Z analytics.report:3 - analytics.report workflow end
2024-11-07T15:35:58Z main - Instrumentation successfully sent
2024-11-07T15:35:58Z main - Sending Analytics
2024-11-07T15:35:59Z main - > request [0x140041059e0]: POST https://api.snyk.io/v1/analytics/cli?org=826f2939-5138-4ef6-8ba5-1089c18ed70e
2024-11-07T15:35:59Z main - > request [0x140041059e0]: header: map[Authorization:[Bearer ***] Content-Type:[application/json; charset=utf-8] Session-Token:[Bearer ***] Snyk-Interaction-Id:[urn:snyk:interaction:506e1011-7a26-4419-b6ff-7841463ea665] Snyk-Request-Id:[fe8f2436-fbe5-4ad4-a079-478209e8f556] User-Agent:[snyk-cli/1.1293.1 (darwin;arm64)] X-Snyk-Cli-Version:[1.1293.1]]
2024-11-07T15:35:59Z main - < response [0x140041059e0]: 200 OK
2024-11-07T15:35:59Z main - < response [0x140041059e0]: header: map[Akamai-Cache-Status:[Miss from child, Miss from parent] Akamai-Grn:[0.c6cf5868.1730993759.14bdc402] Content-Length:[11] Content-Security-Policy:[base-uri https://app.snyk.io; script-src 'self' 'nonce-dy26NB9/Y/PqUgmYyKlZGQ==' 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' 'report-sample'; img-src https: data:; object-src 'none'; frame-ancestors https://app.snyk.io https://learn.snyk.io https://login.snyk.io https://security.snyk.io; report-to csp-report-group; report-uri https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd;] Content-Type:[application/json; charset=utf-8] Date:[Thu, 07 Nov 2024 15:35:59 GMT] Report-To:[{"group":"csp-report-group","max_age":1800,"endpoints":[{"url":"https://web-reports.snyk.io/csp?version=d0c54f5c6cc1a22f31e318e9ec631a33cc211fbd"}],"include_subdomains":true}] Snyk-Request-Id:[fe8f2436-fbe5-4ad4-a079-478209e8f556] Strict-Transport-Security:[max-age=31536000; preload] Vary:[X-HTTP-Method-Override, Accept-Encoding] X-Content-Type-Options:[nosniff] X-Frame-Options:[SAMEORIGIN]]
2024-11-07T15:35:59Z main - Analytics successfully send
2024-11-07T15:35:59Z main - Exiting with 2

ALPHANUM = Word(string.ascii_letters + string.digits)

Remove the dot from the file solves the issue, but we have CLI connected to our CI/CD process so in here we shouldn't manipulate any file just to have the project passig

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