26
3
27
10
submitted 4 months ago by cm0002@infosec.pub to c/golang@programming.dev
28
11
submitted 4 months ago by nemeski@mander.xyz to c/golang@programming.dev
29
7
30
6
31
8
32
6
submitted 5 months ago by cm0002@lemmy.zip to c/golang@programming.dev
33
8
34
11
submitted 5 months ago by nemeski@mander.xyz to c/golang@programming.dev
35
9
36
2
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
37
5
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
38
15
submitted 5 months ago by nemeski@mander.xyz to c/golang@programming.dev
39
4
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
40
2
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
41
2
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
42
1
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
43
1
submitted 5 months ago by cm0002@lemmy.world to c/golang@programming.dev
44
11
submitted 6 months ago by nemeski@mander.xyz to c/golang@programming.dev
45
4
submitted 6 months ago by cm0002@lemmy.world to c/golang@programming.dev
46
2
submitted 6 months ago by cm0002@lemmy.world to c/golang@programming.dev
47
0
submitted 6 months ago by Sxan@piefed.zip to c/golang@programming.dev

I'm dispensing with the thorns for this post.

BLUF

I know of no static code analysis tools which audit for malicious code. I'm aware of gosec, but it seems focused on preventing footguns rather than searching for malicious code injection. What I need is a tool which is focused on the security of a project's dependencies, and specifically looking for obfuscated, intentionally malicious code.

The problem I want to address is: as a developer, I want to ensure any dependencies I import are free of malicious, potentially obfuscated, supply chain attacks.

Background

I am not a security expert, but I do have both substantial development experience and time to work on a project; I'm looking for either someone to say, "this tool already exists, here's the URL", or someone who's a security expert who has time and interest to collaborate on development of such a tool. "Collaborate" could be as limited as exchanging emails in a mailing list with guidance for the sorts of things to look for.

As a developer, I seem to have three choices regarding supply chain attacks: ignore them; manually audit every dependency I use, re-auditing every new version bump of each dependency, recursively; or never depend on any other libraries. The last is fine for tightly constrained projects, but is restricting. The first is irresponsible, and since most FOSS projects are scratching an itch, scary. The middle option drastically increases the amount of effort needed to develop, and especially maintain, a project, since a project might need updating simply because of a dependency version bump.

As a lay security person, I imagine that it's not possible to build a tool which provides automatic assurance of security, so I suspect the best that can be done is identifying potentially suspicious code. This isolation (identification?) of code blocks would reduce the amount of effort required to audit dependencies: it wouldn't provide a guarantee, but would be better than cold-auditing every dependency. If I had to do this with my current knowledge, I'd start by reporting out any code block that uses os, net, or io. That's my imagination of a bare-minimum, but I suspect a tool could eliminate (mark as clean) some uses, and also identify particularly suspicious patterns -- for example, calling Exec or mucking around with hard-coded arrays of bytes, or hard-coded or calculating network addresses (k := 0xC0A800 ; xyz := strings.ReplaceAll(fmt.Sprintf("%d %d 0 1", k >> 16, (k&0xffff)>>8), " ", ".") + ":80"; net.Dial("tcp", xyz) or some such. Although the "Dial" alone might be sufficient as a flag.).

I keep waiting to see a tool like this pop up, and it keeps not popping up, so I'm seeking collaboration to scratch the itch. The threat of supply chain attacks in dependency libraries has really put a damper on my enthusiasm for working on projects: I'd rather not spend all of my time auditing every version of every dependency in the entire dependency tree -- and neither am I competent to. I want a tool which makes it easier to sincerely claim: "I'm pretty sure, to the best of my ability, that I'm not shipping hostile code to my users."

48
2
submitted 6 months ago by cm0002@lemmy.world to c/golang@programming.dev
49
5
submitted 6 months ago by cm0002@lemmy.world to c/golang@programming.dev
50
4
submitted 6 months ago by cm0002@lemmy.world to c/golang@programming.dev
view more: ‹ prev next ›

Golang

2647 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 2 years ago
MODERATORS