Spells always use their keyed attribute, Weapon-based abilities scale with your respective weapon's Attribute, but this isn't really indicated anywhere so it's easy to be confused at first.
This allows you to use a Staff with select Warfare skills to scale with INT, but not use a 2H Sword to scale your Necromancer spells with STR.