|
14 | 14 | REACTIONS_NEGATIVE = ['-1'] |
15 | 15 | REACTIONS_NEUTRAL = ['laugh', 'hooray', 'confused', 'rocket', 'eyes'] |
16 | 16 |
|
| 17 | +COMMIT_HOURS = {i: f"{i%12 if i%12 else 12}{'am' if i < 12 else 'pm'} UTC" for i in range(24)} |
| 18 | + |
| 19 | +# Identifies user-supplied data as per: https://securitylab.github.com/resources/github-actions-untrusted-input/ |
| 20 | +WORKFLOWS_USER_INPUT = { |
| 21 | + "Issue Title": r'\${{\s*github\.event\.issue\.title\s*}}', |
| 22 | + "Issue Body": r'\${{\s*github\.event\.issue\.body\s*}}', |
| 23 | + "Pull Request Title": r'\${{\s*github\.event\.pull_request\.title\s*}}', |
| 24 | + "Pull Request Body": r'\${{\s*github\.event\.pull_request\.body\s*}}', |
| 25 | + "Comment Body": r'\${{\s*github\.event\.comment\.body\s*}}', |
| 26 | + "Review Body": r'\${{\s*github\.event\.review\.body\s*}}', |
| 27 | + "Review Comment Body": r'\${{\s*github\.event\.review_comment\.body\s*}}', |
| 28 | + "Page Name in Pages Event": r'\${{\s*github\.event\.pages(?:\.\w+|\[\d+\])\.page_name\s*}}', |
| 29 | + "Head Commit Message": r'\${{\s*github\.event\.head_commit\.message\s*}}', |
| 30 | + "Head Commit Author\'s Email": r'\${{\s*github\.event\.head_commit\.author\.email\s*}}', |
| 31 | + "Head Commit Author\'s Name": r'\${{\s*github\.event\.head_commit\.author\.name\s*}}', |
| 32 | + "Commit Author\'s Email": r'\${{\s*github\.event\.commits(?:\.\w+|\[\d+\])\.author\.email\s*}}', |
| 33 | + "Commit Author\'s Name": r'\${{\s*github\.event\.commits(?:\.\w+|\[\d+\])\.author\.name\s*}}', |
| 34 | + "Pull Request Head Ref": r'\${{\s*github\.event\.pull_request\.head\.ref\s*}}', |
| 35 | + "Pull Request Head Label": r'\${{\s*github\.event\.pull_request\.head\.label\s*}}', |
| 36 | + "Pull Request Default Branch": r'\${{\s*github\.event\.pull_request\.head\.repo\.default_branch\s*}}', |
| 37 | + "Head Ref": r'\${{\s*github\.head_ref\s*}}', |
| 38 | + "Inputs in Event": r'\${{\s*github\.event\.inputs(?:\.\w+|\[\w+\])\s*}}', |
| 39 | +} |
| 40 | + |
17 | 41 | OPENPGP_SIG_TYPES = { |
18 | 42 | 0x00: "Signature of a binary document", |
19 | 43 | 0x01: "Signature of a canonical text document", |
|
0 commit comments