Exhibit 10.1

                 FIRST AMENDMENT TO SECOND AMENDED AND RESTATED
                       REVOLVING CREDIT SECURITY AGREEMENT
                       -----------------------------------

     This First  Amendment to Second Amended and Restated  Revolving  Credit and
Security Agreement (the "Amendment") is made this 14th day of July, 2006, by and
among COMPUDYNE  CORPORATION,  a Nevada corporation  ("CompuDyne"),  COMPUDYNE -
PUBLIC  SAFETY & JUSTICE,  INC.,  a Virginia  corporation  (CompuDyne  Safety"),
NORMENT  SECURITY GROUP,  INC., a Delaware  corporation  ("Norment"),  NORSHIELD
CORPORATION, an Alabama corporation ("Norshield"), FIBER SENSYS, LLC, a Delaware
limited  liability  company  ("Fiber"),   COMPUDYNE  -  INTEGRATED   ELECTRONICS
DIVISION,  LLC, a Delaware limited liability company  ("CompuDyne  Integrated"),
CORRLOGIC,  LLC, a Delaware limited  liability  company  ("CorrLogic"),  XANALYS
CORPORATION,  a  Delaware  corporation  ("Xanalys"),  and  SIGNAMI  DCS,  LLC, a
Delaware limited liability  company  ("Signami")  (CompuDyne,  CompuDyne Safety,
Norment,  Norshield,  Fiber,  CompuDyne  Integrated and  CorrLogic,  Xanalys and
Signami,  each  a  "Borrower",  and  collectively  "Borrowers"),  the  financial
institutions   which  are  now  or  which   hereafter   become  a  party  hereto
(collectively, the "Lenders" and individually a "Lender") and PNC BANK, NATIONAL
ASSOCIATION ("PNC"), as agent for Lenders (PNC, in such capacity, the "Agent").

                                   BACKGROUND
                                   ----------

     A. On December 19, 2005,  Borrowers,  Lenders and Agent entered into, inter
alia,  a certain  Second  Amended and  Restated  Revolving  Credit and  Security
Agreement  (as same has been or may be  amended,  modified,  renewed,  extended,
replaced,  or substituted from time to time, the "Loan  Agreement"),  to reflect
certain financing  arrangements  between the parties thereto. The Loan Agreement
and all other  documents  executed  in  connection  therewith  are  collectively
referred to as the "Existing  Financing  Agreements." All capitalized  terms not
otherwise  defined  herein shall have the meaning  ascribed  thereto in the Loan
Agreement.  In the case of a direct conflict  between the provisions of the Loan
Agreement and the  provisions of this  Amendment,  the  provisions  hereof shall
prevail.

     B. The Borrowers  have  requested and the Agent and the Lenders have agreed
to modify certain definitions, terms and conditions in the Loan Agreement.

     C. The parties have  agreed,  subject to the terms and  conditions  of this
Amendment, to modify and amend the Existing Financing Agreements.

     NOW   THEREFORE,   with  the  foregoing   background   hereinafter   deemed
incorporated  by  reference  herein and made part  hereof,  the parties  hereto,
intending to be legally bound, promise and agree as follows:

     1.   Amendment  to Loan  Agreement.  Upon  the  Effective  Date,  the  Loan
Agreement shall be amended as follows:

          (a)  A new  definition  of "CD Advance Rate" shall be added to Section
1.2 of the Loan Agreement as follows:

               "CD  Advance  Rate"  shall  have the  meaning  set  forth  in
Section 2.1(a)(y)(viii).





          (b)  The  definition  of  "Advances  Rates"  shall be  deleted  in its
entirety and replaced as follows:

               "Advance  Rates"   shall  have  the   meaning  set  forth  in
Section 2.1(a)(y)(viii).

          (c)  Section  2.1(a) of the Loan  Agreement  shall be  deleted  in its
entirety, and replaced as follows:

               (a)  Amount  of  Revolving  Advances.  Subject  to the  terms and
     conditions set forth in this Agreement  including  Sections 2.1(b),  2.1(c)
     and 2.1(d),  each Lender,  severally and not jointly,  will make  Revolving
     Advances to Borrowers in aggregate amounts outstanding at any time equal to
     such  Lender's  Commitment  Percentage  of the  lesser  of (x) the  Maximum
     Revolving  Advance Amount less the aggregate  Maximum Undrawn Amount of all
     outstanding Letters of Credit and (y) an amount equal to the sum of:

                    (i)  up to 80%,  subject to the provisions of Section 2.1(b)
          hereof ("Receivables Advance Rate"), of Eligible Receivables, plus

                    (ii) up to the lesser of (A) 50%,  subject to the provisions
          of  Section  2.1(b)  hereof,  of  the  value  of  Eligible   Inventory
          ("Inventory  Advance Rate") and (B) $3,000,000 in the aggregate at any
          one time, plus

                    (iii) up to the lesser of (A) 50%, subject to the provisions
          of Sections 2.1(b) and 2.1(c) hereof,  of the value of Costs in Excess
          of Billings ("Costs in Excess Advance Rate") and (B) $5,000,000 in the
          aggregate at any one time, plus

                    (iv) $1,487,500,  which  represents  70% of the  FMV of Real
          Property;  provided  that,  the  amount  set  forth  in  this  Section
          2.1(a)(y)(iv)  shall be reduced (but not below zero) by  $12,395.83 on
          the first day of each month, commencing on February 1, 2006, plus

                    (v)  subject to  Section  2.1(d)  hereof,  the lesser of (a)
          $1,600,000 and (B) the value of the Borrowers' machinery and equipment
          as  adjusted  by the M&E Reset  Value;  provided,  that the amount set
          forth in this  Section  2.1(a)(y)(v)  shall be reduced  (but not below
          zero) by the  Amortization  Amount on the first day of each month and,
          commencing on the applicable Amortization Date., plus

                    (vi) 90%,  subject  to  the  provisions  of  Section  2.1(b)
          hereof,  of the Current  Value of Marketable  Securities  ("Marketable
          Securities Advance Rate"), plus

                    (vii) up to the lesser of (A) 80%, subject to the provisions
          of  Section  2.1(b)  hereof,  of  the  value  of  Eligible  Government
          Receivables ("Government Receivables Advance Rate") and (B) $1,000,000
          in the aggregate at any one time,  plusup to 100% of the value of cash
          and certificates of deposit pledged to Agent and Lenders,  pursuant to
          documentation   satisfactory   to  Agent  in  its  sole  and  absolute
          discretion  ("CD  Advance  Rate"  and  together  with the  Receivables
          Advance  Rate,  Inventory  Advance Rate,  the Costs in Excess  Advance
          Rate,  the  Marketable  Securities  Advance  Rate  and the  Government
          Receivables Advance Rate, collectively, the "Advance Rates"), minus





                    (ix) the aggregate Maximum Undrawn Amount of all outstanding
          Letters of Credit, including without limitation,  the Existing Letters
          of Credit, minus

                    (x)  such reserves as Agent may  reasonably  deem proper and
          necessary in its Permitted Discretion from time to time.

     The amount derived from the sum of (x) Sections  2.1(a)(y)(i),  (ii) (iii),
     (iv), (v), (vi), (vii) and (viii) minus (y) Sections 2.1 (a)(y)(ix) and (x)
     at any time and from  time to time  shall be  referred  to as the  "Formula
     Amount".  The Revolving  Advances shall be evidenced by one or more secured
     promissory notes (collectively,  the "Revolving Credit Note") substantially
     in the form attached hereto as Exhibit 2.1(a).

          (d)  A new  Section  2.1(d)  shall be added to the Loan  Agreement  as
follows:

               2.1(d) Recalculation of Machinery and Equipment Advance Amount.
     Commencing  with  July 1,  2006,  on or after  January 1 and July 1 of each
     year,  Borrowers  shall submit to Agent a schedule  ("M&E Value  Schedule")
     evidencing the value of Borrowers' machinery and equipment as of such date,
     and such schedule  shall list for the prior six month period ending on each
     December 31 and June 30, as applicable,  (i) all purchases of  unencumbered
     equipment  and  machinery  (other  than Liens in favor of the Agent for the
     benefit of the  Lenders)  during such period,  together  with copies of all
     invoices and other documentation  reasonably  requested by Agent evidencing
     the net invoice cost of such purchase (excluding taxes, shipping, delivery,
     handling, installation, overhead and other so called "soft" costs) and (ii)
     the value of the  machinery  and  equipment  sold or retired  by  Borrowers
     during such  period.  Agent shall have at least five (5) days to review and
     approve the M&E Value  Schedule and the value of the  Borrowers'  machinery
     and  equipment  set forth  therein in its  reasonable  credit  judgment (as
     approved, the "M&E Reset Value"). Upon Borrowers' delivery of the Borrowing
     Base Certificate  immediately  following  Agent's approval of the M&E Value
     Schedule (each such date, a "Reset Date"),  Agent shall permit Borrowers to
     request Advances against the M&E Reset Value and such M&E Reset Value shall
     be amortized by 1/60th of the M&E Reset Value (the  "Amortization  Amount")
     commencing with each March 1 or September 1, as applicable,  following each
     Reset Date (each such date, the "Amortization  Date");  provided,  however,
     the first Amortization Date shall be August 1, 2006.

          (e)  Section  7.3  of the  Loan  Agreement  shall  be  deleted  in its
entirety, and replaced as follows:

               7.3  Guarantees.   Become   liable   upon  the   obligations   or
     liabilities of any Person by assumption, endorsement or guaranty thereof or
     otherwise  (other than to Lenders)  except (i) the endorsement of checks in
     the Ordinary Course of Business and (ii) guarantees executed by one or more
     Borrowers guaranteeing Indebtedness incurred by another Borrower so long as
     the  incurrence  of  such   Indebtedness  is  permitted  by  such  Borrower
     hereunder.





          (f)  Section  7.11 of the  Loan  Agreement  shall  be  deleted  in its
entirety, and replaced as follows:

               7.11 Leases.  Enter as lessee into any lease arrangement for real
     or personal  property  (unless  capitalized and permitted under Section 7.6
     hereof) if after giving effect  thereto,  aggregate  annual rental payments
     for all leased  property would exceed  $4,000,000 in any one fiscal year in
     the aggregate for all Borrowers.

          (g)  Section  7.21 of the  Loan  Agreement  shall  be  deleted  in its
entirety, and replaced as follows:

               7.21 Subordinated  Notes and  Industrial  Revenue  Bonds.  At any
     time, directly or indirectly,  pay, prepay,  repurchase,  redeem, retire or
     otherwise  acquire,  or make any  payment on account of any  principal  of,
     interest  on or  premium  payable  in  connection  with  the  repayment  or
     redemption  of the  Subordinated  Notes;  provided  that (A) if  Borrowers'
     Unrestricted  Undrawn  Borrowing Base Availability plus cash and marketable
     securities on hand after giving effect to such payment is less than Fifteen
     Million Dollars  ($15,000,000) and no Default or Event of Default exists or
     would  exist  after  giving  to any  such  payment,  Borrowers  may pay the
     regularly scheduled payments of interest due on the Subordinated Notes, (B)
     if Borrowers'  Unrestricted  Undrawn  Borrowing Base Availability plus cash
     and  marketable  securities  on hand after giving effect to such payment is
     equal to or in excess of Fifteen Million Dollars  ($15,000,000),  Borrowers
     may  pay  the  regularly   scheduled   payments  of  interest  due  on  the
     Subordinated  Notes regardless of whether  Borrowers are in compliance with
     the  covenant  set forth in Section  6.5(a) so long as no other  Default or
     Event of Default exists or would exist after giving effect to such payment,
     and (C) Borrowers may repurchase or redeem up to a maximum aggregate amount
     of $2,000,000 of Subordinated Notes;  provided that, (i) the purchase price
     for any Subordinated Notes repurchased or redeemed shall not exceed seventy
     five  percent  (75%) of par value and (ii) at the time of, and after giving
     effect to, such repurchase or redemption,  Borrowers would be in compliance
     with the limitations set forth in Sections 7.21(A) or 7.21(B) above.

          2.   Consent.  Notwithstanding  anything to the contrary  contained in
the Loan  Agreement to the  contrary,  Agent and Lenders  hereby  consent to the
acquisition by Signami of the assets as  contemplated  by the terms of the Asset
Purchase Agreement (as defined below).

          3.   Reaffirmation. Each Borrower hereby:

               (a)  reaffirms all  representations  and warranties made to Agent
and Lenders  under the Loan  Agreement and all of the other  Existing  Financing
Agreements  and confirms that all are true and correct in all material  respects
as of the  date  hereof  (except  to the  extent  any such  representations  and
warranties  specifically  relate  to  a  different  date,  in  which  case  such
representations  and  warranties  shall  be true  and  correct  in all  material
respects on and as of such other specific date);

               (b)  reaffirms  all  of  the  covenants  contained  in  the  Loan
Agreement,  covenants to abide thereby until all Advances, Obligations and other
liabilities  of  Borrowers  to Agent and  Lenders  under the Loan  Agreement  of
whatever nature and whenever  incurred,  are satisfied  and/or released by Agent
and Lenders; and





               (c)  Except as  modified  by the terms  hereof,  all of the other
terms and  conditions of the Loan  Agreement,  as amended,  and all other of the
Existing  Financing  Agreements are hereby reaffirmed and shall continue in full
force and effect as therein written.

          4.   Representations and Warranties. Each Borrower hereby:

               (a)  represents  and warrants that no Default or Event of Default
has occurred and is continuing under any of the Existing Financing Agreements;

               (b)  except as modified  hereby,  represents and warrants that it
has the authority and legal right to execute, deliver and carry out the terms of
this  Amendment,  that  such  actions  were  duly  authorized  by all  necessary
corporate or limited  liability  company action and that the officers  executing
this Amendment on its behalf were similarly  authorized and empowered,  and that
this   Amendment   does  not  contravene  any  provisions  of  its  articles  of
incorporation or by-laws, or certificate of formation or operating agreement, as
applicable,  or other  formation  documents,  or of any contract or agreement to
which it is a party or by which any of its properties are bound; and

               (c)  represents   and  warrants  that  this   Amendment  and  all
assignments,  instruments,  documents,  and agreements executed and delivered in
connection herewith, are valid, binding and enforceable in accordance with their
respective terms.

          5.   Conditions  Precedent/Effectiveness  Conditions.  This  Amendment
shall be effective  upon  satisfaction  of the  following  conditions  precedent
("Effective  Date") (all documents to be in form and substance  satisfactory  to
Agent and Agent's counsel):

                    (a)  Agent shall have received this Amendment fully executed
by Borrowers;

                    (b)  Receipt by Agent of a  non-refundable  amendment fee in
the  amount  of  $25,000,  which  shall be fully  earned  as of the date of this
Amendment;

                    (c)  Agent shall have received  fully  executed copy of that
certain Asset Purchase Agreement by and among CompuDyne,  Signami, Signami, LLC,
Bert Jones,  Gary  Kenworthy and Apple Oak Farms dated on or about July 14, 2006
(the "Asset Purchase Agreement");

                    (d)  Replacements  of, and  supplements  to,  any  exhibits,
schedules  or  supplements  to the Loan  Agreement  as  necessary to reflect any
change resulting from consummations of the transactions under the Asset Purchase
Agreement; and

                    (e)  Agent  shall  have  received  such  other   agreements,
documents or information as requested by Agent in its sole discretion.

          6.   Conditions  Subsequent.  Within ten (10) Business Days  following
consummation of the transaction contemplated under the Asset Purchase Agreement,





the Borrowers  shall have delivered to Agent the following,  if applicable,  (in
form and substance acceptable in all aspects to Agent):

                    (a)  Landlord waivers, in form and substance satisfactory to
Agent for all  premises  occupied  by or to be  occupied  by  Signami,  or where
Collateral of Signami at any time is held;

                    (b)  Certified copies of or original  insurance  policies of
Signami  along  with a  standard  Lender's  Loss  Payee and  Additional  Insured
Endorsement issued in favor of Agent;

                    (c)  Uniform  Commercial  Code,  judgment,  and  federal and
state tax lien  searches  against  Signami with the Secretary of State and local
filing office of each state where New Borrower maintains its executive office, a
place of business or assets, showing that the property of Signami is not subject
to any  Liens  except  for Liens  permitted  in the Loan  Agreement,  all at the
expense of Borrowers;

                    (d)  UCC  financing  statements  and such  other  documents,
instruments  and writings  required to be executed  and/or  delivered by Signami
under any provision of the Loan Agreement, as amended hereby;

                    (e)  A good standing  certificate  showing  Signami to be in
good standing in its state of incorporation or formation and in each other state
or foreign  country in which it is doing and  presently  intends to do  business
except any such  jurisdiction for which such failure to be so qualified will not
have a Material Adverse Effect or adversely effect Agent's and/or Lenders' right
hereunder; and

                    (f)  A  collateral  pledge  agreement  executed by CompuDyne
Integrated pledging the ownership interests of Signami to Agent and Lenders.

          7.   Further Assurances.  Each Borrower hereby agrees to take all such
actions and to execute and/or  deliver to Agent and Lenders all such  documents,
assignments,  financing statements and other documents, as Agent and Lenders may
reasonably  require from time to time, to effectuate  and implement the purposes
of this Amendment.

          8.   Payment of Expenses.  Borrowers  shall pay or reimburse Agent and
Lenders for its reasonable  attorneys'  fees and expenses in connection with the
preparation,  negotiation  and  execution of this  Amendment  and the  documents
provided for herein or related hereto.

          9.   Confirmation of Obligations.  Borrowers'  confirm and acknowledge
that as of the close of business on July 3, 2006,  the  outstanding  Obligations
consist of (i) $0 of Revolving Advances,  (ii) issued and outstanding Letters of
Credit in the Maximum Undrawn Amount equal to $14,171,130.25 and (iii) all fees,
costs and expenses  incurred to date in connection  with the Loan  Agreement and
the Other Loan Documents.

          10.  Miscellaneous.

               (a)  Third  Party  Rights.  No rights are  intended to be created
hereunder  for the benefit of any third party  donee,  creditor,  or  incidental
beneficiary.





               (b)  Headings.  The headings of any  paragraph of this  Amendment
are for  convenience  only and  shall  not be used to  interpret  any  provision
hereof.

               (c)  Modifications.  No  modification  hereof  or  any  agreement
referred to herein shall be binding or enforceable  unless in writing and signed
on behalf of the party against whom enforcement is sought.

               (d)  Governing  Law. The terms and  conditions of this  Amendment
shall be governed by the laws of the Commonwealth of Pennsylvania.

               (e)  Counterparts.  This  Amendment may be executed in any number
of counterparts and by facsimile, each of which when so executed shall be deemed
to be an original and all of which taken together  shall  constitute one and the
same agreement.





     IN WITNESS  WHEREOF,  the parties have caused this Amendment to be executed
and  delivered  by their duly  authorized  officers  as of the date first  above
written.

                            COMPUDYNE CORPORATION



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

                            COMPUDYNE - PUBLIC SAFETY & JUSTICE, INC.



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

                            NORSHIELD CORPORATION



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

                            FIBER SENSYS, LLC



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

                            COMPUDYNE - INTEGRATED ELECTRONICS DIVISION, LLC



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

     [Signature Page 1 of 2 (First Amendment To Second Amended And Restated
                     Revolving Credit Security Agreement)]





                            CORRLOGIC, LLC



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  ----------------------------------------------

                            NORMENT SECURITY GROUP, INC.



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  --------------------------------------

                            XANALYS CORPORATION



                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  --------------------------------------

                            SIGNAMI DCS, LLC


                            By:
                               -------------------------------------------------
                            Name:
                                 -----------------------------------------------
                            Title:
                                  --------------------------------------



                            PNC BANK, NATIONAL ASSOCIATION,
                            as Lender and as Agent



                            By:
                               -------------------------------------------------
                               James P. Sierakowski, Vice President





     [Signature Page 2 of 2 (First Amendment To Second Amended And Restated
                     Revolving Credit Security Agreement)]