Drow are forbidden to harm a spider - unless they can get away with it.
Drow of Faerûn are hesistant to harm a spider, since that
creature is sacred to their deity Lolth, and to kill a spider is
punishable by death.
According to the AD&D 2e product Menzoberranzan (The City, p.14),
which details the drow city of that name:
Anyone who mistreats an arachnid, or any creature (from slave to
beast of burden) of a House, is fined and whipped by priestesses of
the Spider Queen. Those who kill spiders must die.
This applies even in accident, such as in the novel Daughter of the
Drow (p.4), where a soldier in Menzoberranzan is executed on the spot
after a priestess spots him accidentally stepping on a spider:
Unfortunately for that soldier, the priestess happened to look over
her shoulder just as the spider, a creature sacred to Lolth,
simultaneously lost its dinner and its life.
"Sacrilege!" she declaimed in a voice resonant with power and magic.
She swept a finger toward the offending soldier and demanded,
"Administer the law of Lolth, now!"
However, this law is not necessarily absolute, according to
Menzoberranzan (The City, p.15):
Drow law, as Drizzt Do'Urden so clearly saw, is but a cruel facade
to cover the chaos of ruthlessly-striving, ambitious drow fighting
each other: a mockingly ironic set of rules in which the only ones
to be punished are those who get caught.
The D&D 4th edition Menzoberranzan, p.20, also questions how
absolute the drow prohibition on harming spiders really is:
According to surface-world folktales, dawk elves venerate spiders so
fervently that a drow will never harm one. That's a
characteristically outsider misunderstanding of drow psychology ...
Drow make no special effort to harm their eight-legged cohorts, but
aren't above destroying them if they get in the way (though not in
the presence of a zealous priestess or a superior drow who might use
the act against them). Some drow ceremonially eat a spider at the
beginning of each meal as a way ot giving thanks to the arachnid
It's also questionable whether the taboo on killing spiders is an
edict handed down by Lolth herself, or merely an interpretation of her
dogma as given by her priestesses.
Faiths and Pantheons p.41 describes it as a religious dogma:
Revere arachnids of all kinds; those who kill or mistreat a spider
That same page describes that Faerûn's Lolth is the same entity
as the Lolth other other worlds, such as Greyhawk. This is important
because in Flesh For Lolth: The Secret Life of Dark Elves, in Dragon #298, p.30, it's described that drow in general have absolutely no problem
The squishing and crunching sound of stepped-on spiders is a
constant refrain. Drow do not bother to check for spiders before
sitting. A matriarch might idly seize a fist-sized spider while
negotiating a trade arrangement and proceed to casually rip its legs
off, one by one. Drow breads and puddings are speckled with stray
legs, mandibles, and eggs.
This suggests that the prohibition on killing spiders is not something
required by Lolth, but merely a rule decided upon by her priestesses,
meaning that it may vary between individual settlements and even time
periods, depending which noble houses are in charge at the time.
In short: For a drow, killing a spider is punishable by death if
the priestesses of your settlement decide it's illegal on the grounds
of disrespecting spiders (as has historically been the case in Menzoberranzan), and
they catch you doing it openly, and you're not sufficiently
high-status to get away with it.
They won't suddenly bow down to worship the spider, or assume it's a messenger of Lolth or anything. Also, it's not illegal to kill a party of invaders, even if they do appear to own a spider.
Seeing someone transformed into a spider or spider-like creature has special connotations in drow society: Lolth transforms drow who fail her into spider-like abominations. However, most drow are also familiar with the existence of polymorph magic, and unlikely to mistake a human turning into a a spider for a drow turning into a drider.
They may, however, attack this "fake" spider more readily: it's not a real spider after all, and using magic to disguise yourself as someone of higher status is illegal in Menzoberranzan, giving the drow a possible pretext to attack the party if they needed one. However, this also carries risk, since if a priestess shows up to break up the fight, and sees low-status drow attacking what appears to be a real spider, their lives may well be forfeit.