Live data from Hacker News

AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

wiz.io

31–40 of 179 posts

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#31

No, Snowflake allowing autofixes compromised their Jira. If you tell someone to shoot you in the foot, and they shoot you in the foot, you shot yourself in the foot, just with more steps. If someone else finds the memo that says you've set up foot shooting as a service, and then they trigger that service, you still shot yourself in the foot.

Help me understand. Snowflake configured their Github repo to allow auto fixes by Copilot. It got merged automatically without anyone's review? And introduced essentially script-injection vulnerability through the title field?

If this is the case, I would say Snowflake should shut down its repo and get off Github asap.

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#32
post #22
post #19

YAML is a nightmare fuel spec. In its quest to make markup "human readable", it has created countless footguns. I honestly prefer XML at this point.

It’s find for actions and workflows as long as you do no interpolation and logic. Better move as much of that as possible into your own scripts. And your scripts can be portable between forges, and even run locally!

The YAML spec/parse _itself_ does interpolation and logic - incorrectly in some cases. YAML is pretty much never the right solution.

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#33
post #25

The first linked PR (#1218) has only one commit co-authored by Copilot and it's not related to the vulnerability, and neither are the other suggestions in the PR. Am I missing something?

Github is having some problems -- will check! thanks a lot!

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#34
post #6
post #4

Earlier quoted context omitted.

You can't rely on people spotting the significance of such changes

^^ Absolutely. Nothing in the PR jumps out as a red flag. Unless you know how the internals work, I suppose.

Are you kidding? It's a very obvious case of quote injection. Not some subtle race condition or anything.

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#35
post #19

YAML is a nightmare fuel spec. In its quest to make markup "human readable", it has created countless footguns. I honestly prefer XML at this point.

In a similar vein, JSON's lack of comments makes me marvel at how consistently JavaScript seems to choose the worse option. I'm oh so glad it found its way into config files

[deleted]

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#36
post #22
post #19

YAML is a nightmare fuel spec. In its quest to make markup "human readable", it has created countless footguns. I honestly prefer XML at this point.

It’s find for actions and workflows as long as you do no interpolation and logic. Better move as much of that as possible into your own scripts. And your scripts can be portable between forges, and even run locally!

> It’s find for actions and workflows as long as you do no interpolation and logic.

How do you specify actions and workflows without interpolation and logic kind sir?

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#37
I probably would have made the same mistake. It is negligent to write GitHub Actions without using static analysis.

Use zizmor in CI https://github.com/zizmorcore/zizmor

    error[template-injection]: code injection via template expansion
      --> .github/workflows/jira_issue.yml:24:29
       |
    22 |         run: |
       |         --- this run block
    23 |           # Escape special characters in title and body
    24 |           TITLE=$(echo '${{ github.event.issue.title }}' | sed 's/"/\\"/g' | sed "s/'/\\\'/g")
       |                             ^^^^^^^^^^^^^^^^^^^^^^^^ may expand into attacker-controllable code
       |
       = note: audit confidence → High
       = note: this finding has an auto-fix

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#38
post #19

YAML is a nightmare fuel spec. In its quest to make markup "human readable", it has created countless footguns. I honestly prefer XML at this point.

I never figured out how the hell to write YAML and I definitely won't now that I trust the AI to do a better job than me. It's so unintuitive.

Every time I've tried in the past, something as simple as making a value a list had some nonsense expectations. I can't wrap my head around how that spec got any traction and wasn't laughed off the face of the earth the first time it was looked at by someone who didn't create it.

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#39
post #16

It's interesting to look at what was being attempted when the vulnerability was introduced[0] > Workflows like jira_close.yml use deprecated atlassian JIRA actions and have a dependency on the gh-actions repo. This is not ideal and unecessarily complex. PR updates jira_close workflow to use direct API calls via curl. It preserves custom fields used too. I won't speak to this projects' management and how they prioriti…

I have seen plenty of "my backlog has never been shorter" comments here.

I'm interested in how that turns out 6 months later.

In my team, we have plenty of enhancement requests from users. We address those that make obvious sense and are trivial to do but withhold from others, even though the code change itself is likely small. Because we don't know if there is more than a single user that can actually benefit from it, if it has unintended consequences, or if it causes maintainence issue down the road.

Re: AI-Generated GitHub Copilot “Autofix” Allowed Compromise of Snowflake's Jira

#40

No, Snowflake allowing autofixes compromised their Jira. If you tell someone to shoot you in the foot, and they shoot you in the foot, you shot yourself in the foot, just with more steps. If someone else finds the memo that says you've set up foot shooting as a service, and then they trigger that service, you still shot yourself in the foot.

Help me understand. Snowflake configured their Github repo to allow auto fixes by Copilot. It got merged automatically without anyone's review? And introduced essentially script-injection vulnerability through the title field? If this is the case, I would say Snowflake should shut down its repo and get off Github asap.

No. A Snowflake maintainer opened a PR, Copilot suggested a change (introducing a vulnerability), the maintainer accepted and committed it to their PR, and another Snowflake maintainer approved and merged the PR.
Post reply on HN