saltstack / saltstack/salt

hashutil.github_signature does not recognize sha argument

Open
#58,130 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug docstring-update documentation module doc standards severity-low time-estimate-sprint
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

Executing salt <minion> hashutil.github_signature '{"ref":....} ' 'shared secret' 'sha1=<key> returns the error:

ERROR executing 'hashutil.github_signature': The following keyword arguments are not valid: sha1=c12560e6fe48bf2a1e96119a81ffb9d3ee033717

Setup

GitHub Webhook configured for push event.

For the string, cut-n-paste either the payload from GitHub Webhook Recent Deliveries request section or via the event bus. challenge_hmac comes from either location.

Steps to Reproduce Issue

(Include debug logs if possible and relevant.)

Versions Report

(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)

salt --versions-report
Salt Version:
           Salt: 3001

Dependency Versions:
           cffi: Not Installed
       cherrypy: unknown
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: 2.0.3
      gitpython: 2.1.8
         Jinja2: 2.10
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: 1.3.10
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: 3.4.7
         pygit2: Not Installed
         Python: 3.6.9 (default, Apr 18 2020, 01:56:04)
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 17.1.2
          smmap: 2.0.3
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5

System Versions:
           dist: ubuntu 18.04 Bionic Beaver
         locale: UTF-8
        machine: x86_64
        release: 4.15.0-111-generic
         system: Linux
        version: Ubuntu 18.04 Bionic Beaver

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the hashutil.github_signature entry point and reproduce the Salt 3001 command using the GitHub push-event payload and shared secret described in the issue. Trace how the sha1= argument is handled; done means the argument is recognized instead of reported as an invalid keyword argument and the signature check works for the supplied payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, python
Domain
security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.