A one block thick wall should be enough to block any mob attacks on the player.
However, jumping/climbing spiders can deal damage and knockback to the player through a totally closed one block thick wall.
Related issues
duplicates
Attachments
Comments

[media]
This issue may be relates to MC-50668