This paper presents numerical studies of cavity polariton solitons (CPSs) in a resonantly pumped semiconductor microcavity with an imbedded spatial defect. In the bistable regime of the well-known homogeneous polariton condensate, with proper incident wave vector and pump strength, bright and/or dark cavity solitons can be found in the presence of a spatially confined potential. The minimum pump strength required to observe the CPSs or nonlinear localized states in this parametric pump scheme is therefore reported.