The use of the expresssion 首の皮一枚繋がっている + で particle


[![enter image description
here](https://i.stack.imgur.com/dvoG4.png)](https://i.stack.imgur.com/dvoG4.png)

This is said at the beginning of the chapter. The character is contemplating
that he managed to finish without his secret leaking out.

As far I understand 首の皮一枚繋がっている is an expression that means akin to:

" まだわずかな望みが残っていることのたとえ" or " Don't make a mistake again. You're on thin ice"
in english

> ばれてないことで首の皮一枚繋がっている

What I don't exactly understand here it's how it's being used in relation to
ばれてないことで?

My understanding of the sentence, from context, is that his secret didn't
leak, but he's on thin ice/risking it.




ばれてない **ことで** is literally " **with the fact** that it hasn't come out", but
it can be simply interpreted as "since it hasn't come out yet" here. This
首の皮一枚繋がっている is used in a positive sense; "(although I'm on thin ice / hanging
by a thread,) I'm still safe at this moment".

> バレてないことで首の皮一枚繋がっているけど、…
>
> Since it hasn't been discovered yet, I'm still hanging by a thread for now,
> but (I'm virtually finished)

