Leviticus 20:17
And if a man shall take his sister, his father’s daughter, or his mother’s daughter, and see her nakedness, and she see his nakedness; it is a wicked thing; and they shall be cut off in the sight of their people: he hath uncovered his sister’s nakedness; he shall bear his iniquity.
Taking a sister, whether a father's daughter or a mother's daughter, as a wife or for sexual union is forbidden. By contrast with those prohibited degrees of relationship, marriage between cousins is not forbidden by Scripture. Such a sister union is sinful and wicked, and its penalty is to be cut off in the sight of the people, with the offender bearing his guilt and iniquity. The prohibition belongs to the sexual laws that remain in force because they rest on moral considerations.
In Israel this prohibition functioned as civil law under the theocracy, involving exclusion from the assembly of Israel. That exclusion does not decide a child's salvation. Such incestuous unions in violation of prohibited family relationships may be what the term bastard in Deuteronomy referred to, rather than every child born outside marriage.
The law stands in contrast to the pagan abominations and sexual evils practiced by the nations in Canaan whom the Lord cast out of the Holy Land before Israel. Those displaced nations had given themselves up to Satan ruling through the flesh and had filled up their cup with iniquity. The laws reveal the destructive possibilities of evil associated with Spiritualism. They are object lessons showing the exceeding sinfulness of sin.